Ready to pay

Request

Retrieves available payment methods for a specific transaction or purchase.

The order in which the payment methods are displayed to the customer should be the same as the order in the response.

The list of payment methods is generated from available gateway accounts and the last matched adjust-ready-to-pay action on the ready-to-pay-requested event. If no rules match for the specific request, all methods supported by the gateway accounts are sent.

To invert this behavior, place an all matching rule at the end of the ready-to-pay-requested event in the rules engine, and include an empty paymentMethods property for the adjust-ready-to-pay action.

For more information, see Update event rules and Gateway accounts.

Security
SecretApiKey or JWT
Bodyapplication/json
One of:
customerIdstring, <= 50 characters(CustomerId)

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
websiteIdstring, <= 50 characters(WebsiteId)required

ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.

Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
amountnumber, (double)required

Amount to pay.

billingAddressobject(ContactObject)write-only

Billing address.

riskMetadataobject(Risk metadata)required

Risk metadata used for 3D Secure and risk scoring.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/ready-to-pay \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
    "currency": "USD",
    "amount": 0.1,
    "billingAddress": {
      "firstName": "Benjamin",
      "lastName": "Franklin",
      "organization": "Rebilly",
      "address": "36 Craven St",
      "address2": "string",
      "city": "Austin",
      "region": "Texas",
      "country": "GB",
      "postalCode": "WC2N 5NF",
      "phoneNumbers": [
        {
          "label": "main",
          "value": "1-512-777-0269",
          "primary": true
        }
      ],
      "emails": [
        {
          "label": "main",
          "value": "rebilly@example.com",
          "primary": true
        }
      ],
      "dob": "1980-04-01",
      "jobTitle": "CEO"
    },
    "riskMetadata": {
      "ipAddress": "93.92.91.90",
      "fingerprint": "pIUt3xbgX3l9g3YDiLbx",
      "httpHeaders": {
        "Content-Type": "application/json",
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
      },
      "browserData": {
        "colorDepth": 24,
        "isJavaEnabled": true,
        "language": "en-US",
        "screenWidth": 1920,
        "screenHeight": 1080,
        "timeZoneOffset": 300,
        "isAdBlockEnabled": true
      },
      "extraData": {
        "kountFraudSessionId": "abcdefg12345abababab123456789012",
        "payPalMerchantSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowa",
        "threatMetrixSessionId": "dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa"
      }
    },
    "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF"
  }'

Responses

Payment methods retrieved.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
Array [
methodstringrequired

Payment method.

Value:"payment-card"
Discriminator
featurePaymentCardFeature (object) or null
One of:

Specific feature of this method. For example, a digital wallet. If the method does not have any features, this value is null.

brandsArray of strings, non-empty

List of supported brands.

filtersArray of strings(ReadyToPayMethodFilters)

For the method to be applicable, one or more of the following filters must match. If no filters are sent, no restrictions are applied. For more information, see Using filters.

]
Response
[ { "method": "payment-card", "feature": {}, "brands": [], "filters": [] } ]