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 must 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.

If this operation to pay is used with a transaction-scoped JSON Web Token (JWT), all fields are ignored except riskMetadata.

SecurityPublishableApiKey
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.

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.

required
object (Risk metadata)

Risk metadata used for 3D Secure and risk scoring.

ipAddress
string or null <ipv4 or ipv6>

Customer's IP address.

fingerprint
string or null <= 50 characters

Customer's device fingerprint. A device fingerprint is a unique token that is used to identify the customer. The device fingerprint is generated based on device attributes, such as: hardware, software, IP address, language, browser, and more.

object or null

HTTP headers.

property name*
additional property
string
object or null

Browser data used for 3D Secure and risk scoring.

colorDepth
required
integer [ 1 .. 48 ]

Browser color depth in bits per pixel. This value is obtained using the screen.colorDepth property.

isJavaEnabled
required
boolean

Specifies if Java is enabled in a browser. This value is obtained from the navigator.javaEnabled property.

language
required
string <= 8 characters

Browser language settings. This value is obtained from the navigator.language property.

screenWidth
required
integer [ 0 .. 65535 ]

Width of the browser screen. This value is obtained from the screen.width property.

screenHeight
required
integer [ 0 .. 65535 ]

Height of the browser screen. This value is obtained from the screen.height property.

timeZoneOffset
required
integer [ -1410 .. 1410 ]

Browser time zone offset in minutes from UTC. A positive offset indicates that the local time is behind UTC. A negative offset indicates that the local time is ahead of UTC. You can find this value using the (new Date()).getTimezoneOffset() property.

object or null

Third-party data used for risk scoring.

kountFraudSessionId
string [ 10 .. 32 ]

Alpha-numeric fraudSessionId as provided by the Kount SDK.

payPalMerchantSessionId
string [ 1 .. 64 ]

PayPal MerchantSessionID as generated by the PayPal Fraudnet SDK.

threatMetrixSessionId
string [ 1 .. 128 ] [a-zA-Z0-9_-]+

Temporary identifier that is unique to the visitor's session and passed to ThreatMetrix.

object

Billing address.

firstName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's first name.

lastName
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's last name.

organization
string or null <= 255 characters ^[\w\s\-\p{L},.'&]+$

Contact's organization.

address
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

First line of the contact's street address.

address2
string or null <= 60 characters ^[\w\s\-\/\p{L},.#;:()'&]+$

Second line of the contact's street address.

city
string or null <= 45 characters ^[\w\s\-\p{L},.']+$

Contact's city of residence.

region
string or null <= 45 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's region of residence.

country
string or null <= 2 characters ^[A-Z]{2}$

Contact's country of residence in ISO 3166 alpha-2 country code. For examples, see ISO.org.

postalCode
string or null <= 10 characters ^[\w\s\-]+$

Contact's postal code.

Array of objects (ContactPhoneNumbers)

List of phone numbers associated with the contact.

Array
label
required
string <= 45 characters

Phone number label or name.

value
required
string <= 50 characters

Phone number value.

primary
boolean

Specifies if the phone number is the contact's primary phone number.

Array of objects (ContactEmails)

List of email addresses associated with the contact.

Array
label
required
string <= 45 characters

Email label or name.

value
required
string <email> <= 255 characters

Email address value.

primary
boolean

Specifies if the email address is the contact's primary email address.

dob
string or null <date>

Contact's date of birth in ISO-8601 YYYY-MM-DD format.

jobTitle
string or null <= 255 characters ^[\w\s\-\/\p{L},.#;:()']+$

Contact's job title.

Responses
200

Payment methods retrieved.

Response Schema: application/json
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.

Any of:

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

name
string

Name of the feature.

Value: "Apple Pay"
displayName
string

String of 64 or fewer UTF-8 characters containing the canonical name for your store, that is suitable for display. Do not localize the name.

country
string (DigitalWalletCountry) ^[A-Z]{2}$

ISO 3166 alpha-2 country code where the payment is processed. This is often the location for settling the payment. Consult with your Payment Service Provider (PSP) to determine the appropriate country code.

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" … 4 more
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/storefront/ready-to-pay
Request samples
application/json
{
  • "currency": "USD",
  • "amount": 0,
  • "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
  • "billingAddress": {
    },
  • "riskMetadata": {
    }
}
Response samples
application/json
{
  • "method": "payment-card",
  • "feature": {
    },
  • "brands": [
    ],
  • "filters": [
    ]
}