Method: getOffers

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 (RequestHeader)
  },
  "transactionAmount": {
    object (Amount)
  },
  "instrument": {
    object (PaymentInstrument)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

transactionAmount

object (Amount)

REQUIRED: The amount of the transaction to get offers for.

instrument

object (PaymentInstrument)

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

object (GetOffersResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

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 (FinancingInstrument)
  }
  // End of mutually exclusive fields.
}
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

object (FinancingInstrument)

User's private label financing instrument.

End of mutually exclusive fields.

GetOffersResponse

Response object for the getOffers method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (GetOffersResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (GetOffersResult)

REQUIRED: Result details of the getOffers request.

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 (AvailableOffers)
  },
  "invalidInstrument": {
    object (Empty)
  },
  "insufficientFunds": {
    object (InsufficientFunds)
  },
  "riskDeclined": {
    object (RiskDeclined)
  },
  "accountNotEligible": {
    object (AccountNotEligible)
  },
  "noOffersAvailable": {
    object (Empty)
  }
  // End of mutually exclusive fields.
}
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

object (AvailableOffers)

Offers available for the transaction and the instrument.

invalidInstrument

object (Empty)

The provided instrument is unrecognized, malformed, expired, or does not exist with the integrator.

insufficientFunds

object (InsufficientFunds)

The instrument does not have sufficient funds or available credit to qualify for offers for the requested amount.

riskDeclined

object (RiskDeclined)

No offers are available due to a risk check on the payment integrator's side.

accountNotEligible

object (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

object (Empty)

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 (Offer)
    }
  ]
}
Fields
offers[]

object (Offer)

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 (InstallmentPayment)
  }
  // End of mutually exclusive fields.
}
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

object (InstallmentPayment)

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 (RawResult)
  }
}
Fields
rawResult

object (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 scope would be "visa" and the rawCode would be whatever the VISA network returned.