- HTTP request
- Request body
- Response body
- PaymentInstrument
- GetOffersResponse
- GetOffersResult
- AvailableOffers
- Offer
- AccountNotEligible
Retrieve available offers (e.g., EMI tenures) for a given transaction amount and payment instrument.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type .ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "cmVxdWVzdDE",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "gsp"
},
"transactionAmount": {
"amountMicros": "5000000000",
"currencyCode": "INR"
},
"instrument": {
"financingInstrument": {
"accountNumber": "1111222233334444",
"issuerId": {
"value": "gsp_issuer_1"
}
}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"availableOffers": {
"offers": [
{
"installmentPlan": {
"threeMonths": {}
}
},
{
"installmentPlan": {
"sixMonths": {}
}
}
]
}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/redirect-fop-v1/getOffers
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "requestHeader": { object ( |
| Fields | |
|---|---|
requestHeader |
REQUIRED: Common header for all requests. |
transactionAmount |
REQUIRED: The amount of the transaction to get offers for. |
instrument |
REQUIRED: The payment instrument to get offers for. |
Response body
This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.
| Possible response messages | |
|---|---|
| HTTP 200 Status |
|
| HTTP 4XX / 5XX Status |
|
| End of mutually exclusive fields. | |
PaymentInstrument
Details of the payment instrument for which offers are requested.
| JSON representation |
|---|
{
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"financingInstrument": {
object ( |
| Fields | |
|---|---|
| REQUIRED: The payment instrument being queried for offers. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
financingInstrument |
User's private label financing instrument. |
| End of mutually exclusive fields. | |
GetOffersResponse
Response object for the getOffers method.
| JSON representation |
|---|
{ "responseHeader": { object ( |
| Fields | |
|---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result details of the |
GetOffersResult
Result details of the getOffers request.
| JSON representation |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "availableOffers": { object ( |
| Fields | |
|---|---|
| REQUIRED: The result of the get offers request. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
availableOffers |
Offers available for the transaction and the instrument. |
invalidInstrument |
The provided instrument is unrecognized, malformed, expired, or does not exist with the integrator. |
insufficientFunds |
The instrument does not have sufficient funds or available credit to qualify for offers for the requested amount. |
riskDeclined |
No offers are available due to a risk check on the payment integrator's side. |
accountNotEligible |
The instrument is recognized and valid, but the account is not eligible to receive offers (e.g., due to account status, credit policy, or category restrictions). |
noOffersAvailable |
No offers are available for the transaction amount and instrument. |
| End of mutually exclusive fields. | |
AvailableOffers
The integrator successfully retrieved offers. Details are within this message.
| JSON representation |
|---|
{
"offers": [
{
object ( |
| Fields | |
|---|---|
offers[] |
REQUIRED: The list of available offers for this transaction. |
Offer
Details of an offer available for the transaction.
| JSON representation |
|---|
{
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"installmentPlan": {
object ( |
| Fields | |
|---|---|
| REQUIRED: The specific type of offer. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
installmentPlan |
An installment plan offer for the transaction. |
| End of mutually exclusive fields. | |
AccountNotEligible
User's account is not eligible for this service.
| JSON representation |
|---|
{
"rawResult": {
object ( |
| Fields | |
|---|---|
rawResult |
OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the |