Ready to pay

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.

SecuritySecretApiKey or JWT
Request
Request Body schema: application/json
One of:
currency
required
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

amount
required
number <double>

Amount to pay.

customerId
string (CustomerId) <= 50 characters

ID of the customer resource.

websiteId
required
string (WebsiteId) <= 50 characters

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

object

Billing address.

required
object (Risk metadata)

Risk metadata used for 3D Secure and risk scoring.

Responses
200

Payment methods retrieved.

Response Schema: application/json
Array
method
required
string

Payment method.

(Apple Pay Digital Wallet (object or null)) or (Google Pay Digital Wallet (object or null))

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

brands
Array of strings (PaymentCardBrand) non-empty

List of supported brands.

Items Enum: "Visa" "MasterCard" "American Express" "Discover" "Maestro" "Solo" "Electron" "JCB" "Voyager" "Diners Club" "Switch" "Laser" "China UnionPay" "AstroPay Card"
filters
Array 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.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/ready-to-pay
Request samples
application/json
{
  • "currency": "USD",
  • "amount": 0,
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
  • "billingAddress": {
    },
  • "riskMetadata": {
    }
}
Response samples
application/json
[
  • {
    }
]