Skip to Content
Docs
Setup sessions

Create a setup session

POST/sessions/setup

Creates a new setup session to save a payment method for the customer without charging it. The client_secret is only returned by this call.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.

  • A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
  • If the first request is still being processed, a retry gets 409 idempotency_error (request_in_progress).
  • The same key on another endpoint, or with another body, gets 400 idempotency_error (invalid_parameters).
  • GET, PUT and PATCH requests ignore the key.

The response repeats the key in its Idempotency-Key header.

Parameters

customer_reference_idstringRequired

Your unique identifier for the customer, used to retrieve and manage saved payment methods. The customer is created if it does not exist.

billing_detailsobject

Billing information for the payment.

Show 11 child parametersHide child parameters
addressobject

Address details.

Show 6 child parametersHide child parameters
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the billing contact.

emailstring

Email address of the billing contact.

phonestring

Phone number of the billing contact, preferably in E.164 format. The leading + is optional, and an empty string is accepted.

dobstring

Date of birth in YYYY-MM-DD format.

national_identification_numberstring

National identification number of the billing contact.

ip_addressstring

IP address (IPv4 or IPv6) of the customer. Used for tax calculation when no address is available.

tax_idsarray of objects

Tax identifiers of the customer. Used for tax calculation.

Show 2 child parametersHide child parameters
typestringRequired

Type of the tax identifier. One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst, or pl_nip.

One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst or pl_nip.

valuestringRequired

Value of the tax identifier.

kyc_datestring

Time at which the customer's KYC check was completed, in ISO 8601 format.

screening_datestring

Time at which the customer was last screened, in ISO 8601 format.

signature_datestring

Time at which the customer signed the agreement, in ISO 8601 format.

payment_method_optionsobject

Payment method specific configurations.

Show 14 child parametersHide child parameters
cardobject

Options for Card payments.

Show 20 child parametersHide child parameters
accepted_card_brandsarray of strings

List of card brands to accept for this payment.

accepted_card_fundingarray of strings

List of card funding to accept for this payment.

accepted_card_jurisdictionsarray of strings

List of payment jurisdictions to accept for this payment.

accepted_card_categoriesarray of strings

List of card categories to accept for this payment.

accepted_card_countriesarray of strings

List of card countries to accept for this payment.

accepted_eci_valuesarray of strings

List of ECI values to accept for this payment.

enforce_customer_name_as_cardholder_nameboolean

Whether to enforce the customer name as the cardholder name.

security_checksobject

Configuration for security checks to perform.

Show 3 child parametersHide child parameters
address_line1_checkboolean

Whether to perform AVS check for address line 1.

address_postal_code_checkboolean

Whether to perform AVS check for postal code.

cvv_checkboolean

Whether to perform CVV check.

request_threed_securestring

How to request 3D Secure authentication for this payment. One of automatic, challenge, exemption, or none.

One of automatic, challenge, exemption or none.

account_billing_updaterobject

Options for the account billing updater, which refreshes stored card details when the issuer reports a change.

Show 3 child parametersHide child parameters
enabledboolean

Whether the account billing updater is enabled.

retry_after_updateboolean

Whether to retry a declined payment after the card details are updated.

billing_updater_decline_codesarray of strings

Decline codes that trigger an account billing update.

request_sca_exemptionobject

Options for requesting SCA exemption.

Show 4 child parametersHide child parameters
sca_exemption_typestring

Type of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.

One of low_value, transaction_risk_analysis or secure_corporate_process.

soft_decline_loopboolean

Whether soft decline loop is enabled.

soft_decline_loop_decline_codesarray of strings

List of decline codes for soft decline loop.

soft_decline_loop_positioningstring

Controls when the soft decline loop runs relative to the provider fallback sequence. One of at_nearest or after_fallbacks.

One of at_nearest or after_fallbacks.

cvv_whitelistobject

CVV whitelist configuration.

Show 2 child parametersHide child parameters
enabledboolean

Whether CVV whitelist is enabled.

durationstring

Duration for CVV whitelist.

duplicate_card_checkboolean

Whether to perform a duplicate card check and block (same card on more than 1 customer).

motoboolean

Whether this payment is a MOTO (mail order/telephone order) payment.

Default: false

fundingboolean

Whether this payment is an AFT (account funding transaction) payment.

Default: false

pinless_debitobject

Options for pinless debit.

Show 1 child parameterHide child parameters
enabledboolean

Whether pinless debit is enabled.

partial_approvalobject

Options for partial approval.

Show 7 child parametersHide child parameters
acceptboolean

Whether to accept partial approvals.

allow_top_upboolean

Whether to allow top-up for partial approvals.

percentage_thresholdinteger

Percentage threshold for partial approval.

amount_thresholdinteger

Amount threshold for partial approval.

require_full_amountboolean

Whether to require the full amount.

approved_by_defaultboolean

Whether partial approval is approved by default.

productsarray of objects

List of predefined products for partial approval.

Show 5 child parametersHide child parameters
amountnumberRequired

Amount for the product.

titlestringRequired

Title of the product.

descriptionstring

Description of the product.

imagestring

Image URL for the product.

idstring

Product ID.

network_tokenobject

Options for network tokens for this payment.

Show 2 child parametersHide child parameters
provisionobject

Options that indicate how to provision network tokens.

Show 2 child parametersHide child parameters
enabledboolean

Whether to provision a network token during the payment.

decline_on_failureboolean

Whether to fail the payment if network token provisioning fails.

authorizationobject

Options that indicate how to use network token for this payment.

Show 3 child parametersHide child parameters
enabledboolean

Whether to use a network token for payment authorization.

full_pan_fallbackboolean

Whether to retry with the full PAN if authorization with the network token fails.

fallback_decline_codesarray of strings

Pay.com decline codes that trigger the full PAN retry, for example, do_not_honour. If not set, the default decline codes of the processor are used.

advanced_fraud_screeningobject

Payment fraud screening options.

Show 3 child parametersHide child parameters
thresholdsarray of objects

Risk score ranges and the outcome to apply to each. The ranges must include an allow range, cover every score from 0 to 100 with no gaps or overlaps (each start is the previous end + 1), and be ordered by severity: a range with a higher score cannot have a less severe outcome than a lower range. Otherwise the request returns 400.

Show 3 child parametersHide child parameters
startintegerRequired

Range beginning for risk control outcome.

endintegerRequired

Range ending for risk control outcome.

outcomestringRequired

Outcome.

One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge or block.

enabledbooleanRequired

Whether advanced fraud screening is enabled for the payment.

learn_modeboolean

Whether advanced fraud screening runs in learn mode.

name_verificationobject

Options to configure the name verification process.

Show 4 child parametersHide child parameters
enabledboolean

Whether to perform name verification with ANI (Account Name Inquiry).

use_customer_nameboolean

Whether to use the customer name for verification with ANI.

accepted_resultsarray of strings

List of ANI results to accept. Each value is one of match, partial_match, no_match, not_performed, or not_supported.

accepted_results_by_fieldobject

ANI results to accept for each name field.

Show 4 child parametersHide child parameters
first_namearray of strings
last_namearray of strings
middle_namearray of strings
full_namearray of strings
us_bank_accountobject

Options for US bank account payments.

Show 4 child parametersHide child parameters
ach_typestring

ACH payment method.

One of next_day or same_day.

networkstring

Network.

One of rtp, ach or fednow.

ach_entrystring

ACH entity.

One of web, ccd, ppd or tel.

ach_fallbackboolean
paypalobject

Options for PayPal payments.

Show 1 child parameterHide child parameters
name_verificationboolean

Whether to perform customer name verification.

applepayobject

Options for Apple Pay payments.

Show 1 child parameterHide child parameters
collectionobject

Allow to enable/disable collection of specific details during a payment.

Show 5 child parametersHide child parameters
billing_addressobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

emailobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

nameobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

phone_numberobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

shipping_addressobject

Controls shipping details collection.

Show 2 child parametersHide child parameters
enabledboolean

Whether to collect shipping details.

include_phone_numberboolean

Whether to include a phone number in shipping details.

googlepayobject

Options for Google Pay payments.

Show 2 child parametersHide child parameters
collectionobject

Allow to enable/disable collection of specific details during a payment.

Show 5 child parametersHide child parameters
billing_addressobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

emailobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

nameobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

phone_numberobject

Data collection details.

Show 1 child parameterHide child parameters
enabledboolean

Whether to collect these details.

shipping_addressobject

Controls shipping details collection.

Show 3 child parametersHide child parameters
enabledboolean

Whether to collect shipping details.

include_phone_numberboolean

Whether to include a phone number in shipping details.

allowed_countriesarray of strings

List of countries to accept for this payment.

require_cryptogram_threed_secureboolean

Whether to require a 3D Secure cryptogram.

bank_accountobject

Options for bank account payments.

Show 1 child parameterHide child parameters
allowed_countriesarray of strings

List of countries to accept for this payment.

routing_methodologiesarray of strings
skrillobject

Verification feature configuration and matching rules.

Show 1 child parameterHide child parameters
verificationobject

Verification feature configuration.

Show 3 child parametersHide child parameters
enabledboolean

Whether the verification feature is enabled.

accepted_verification_level_valuesarray of strings

List of accepted verification levels.

require_match_for_customer_detailsobject

Field-level switches indicating which customer attributes must match between the submitted data and verified identity data in order to consider verification successful.

Show 6 child parametersHide child parameters
first_nameboolean

Whether to require an exact match on the customer's first name.

last_nameboolean

Whether to require an exact match on the customer's last name.

countryboolean

Whether to require an exact match on the customer's country/region.

postal_codeboolean

Whether to require an exact match on the customer's postal/ZIP code.

line1boolean

Whether to require an exact match on the first line of the street address.

dobboolean

Whether to require an exact match on the customer's date of birth.

netellerobject

Verification feature configuration and matching rules.

Show 1 child parameterHide child parameters
verificationobject

Verification feature configuration.

Show 3 child parametersHide child parameters
enabledboolean

Whether the verification feature is enabled.

accepted_verification_level_valuesarray of strings

List of accepted verification levels.

require_match_for_customer_detailsobject

Field-level switches indicating which customer attributes must match between the submitted data and verified identity data in order to consider verification successful.

Show 6 child parametersHide child parameters
first_nameboolean

Whether to require an exact match on the customer's first name.

last_nameboolean

Whether to require an exact match on the customer's last name.

countryboolean

Whether to require an exact match on the customer's country/region.

postal_codeboolean

Whether to require an exact match on the customer's postal/ZIP code.

line1boolean

Whether to require an exact match on the first line of the street address.

dobboolean

Whether to require an exact match on the customer's date of birth.

recurringobject

Terms of the recurring mandate the customer approves when a payment method that needs one (Pix Automático, UPI AutoPay) is saved for future payments. Used only when the payment saves the method. Each provider maps the terms to its own; terms it cannot express decline the payment.

Show 6 child parametersHide child parameters
intervalstring

How often the merchant charges. sporadic: no fixed schedule.

One of day, week, month, year or sporadic.

interval_countinteger

Number of intervals between charges. Defaults to 1.

amountinteger

Amount in the smallest currency unit. Defaults to the amount of the payment that saves the method.

amount_typestring

Whether every charge is exactly amount or at most amount.

One of exact or maximum.

start_datestring

First day the mandate can be charged, YYYY-MM-DD.

end_datestring

Last day the mandate can be charged, YYYY-MM-DD. Open-ended or the provider maximum when omitted.

cashappobject

Options for Cash App Pay payments.

Show 2 child parametersHide child parameters
name_verificationobject

Checks the customer's name against the Cash App account holder's name.

Show 2 child parametersHide child parameters
enabledboolean

Whether name verification is enabled.

similarity_acceptancestring

Minimum name similarity score to accept, as a fraction between 0 and 1.

phone_verificationobject

Checks the last four digits of the customer's phone number against the Cash App account.

Show 1 child parameterHide child parameters
enabledboolean

Whether phone verification is enabled.

statement_descriptor_suffixstring

Suffix for the statement descriptor of this payment. An empty string is accepted.

decline_recoveryobject

Decline recovery settings.

Show 1 child parameterHide child parameters
flex_factorobject

Flex Factor decline recovery.

Show 1 child parameterHide child parameters
enabledboolean

Whether Flex Factor decline recovery is enabled.

authentication_optionsobject

Authentication options for the payment method. three_ds is required when type is three_ds, and three_ri is required when type is three_ri.

Show 3 child parametersHide child parameters
typestringRequired

Type of authentication. One of three_ds, three_ri, or bep.

One of three_ds, three_ri or bep.

three_dsobject

3D Secure authentication options. Required when type is three_ds, and not allowed otherwise.

Show 2 child parametersHide child parameters
accepted_eci_valuesarray of strings

List of accepted ECI values. Each value is one of 00, 01, 02, 05, 06, or 07.

flow_indicatorobject

Flow indicator for 3D Secure authentication.

Show 3 child parametersHide child parameters
typestring

Type of 3D Secure flow. One of challenge, frictionless, or data_share.

One of challenge, frictionless or data_share.

challengeobject

Challenge flow options. Only allowed when type is challenge.

Show 2 child parametersHide child parameters
typestringRequired

Type of challenge, such as mandated.

allow_frictionlessboolean

Whether to allow the frictionless flow as a fallback.

frictionlessobject

Frictionless flow options. Only present when type is frictionless.

Show 1 child parameterHide child parameters
sca_exemption_typestring

Type of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.

One of low_value, transaction_risk_analysis or secure_corporate_process.

three_riobject

3DS Requestor Initiated (3RI) authentication options. Required when type is three_ri, and not allowed otherwise.

Show 2 child parametersHide child parameters
indicatorstring

3RI indicator. One of recurring or ucof.

One of recurring or ucof.

require_issuer_liability_shiftboolean

Whether to require an issuer liability shift.

payment_method_typesarray of strings

The list of payment method types allowed for this setup session. Defaults to the payment method types enabled in your payment method options (your payout method options when payout is true). Ignored when automatic_payment_methods is true.

automatic_payment_methodsboolean

Whether to offer every eligible payment method type enabled in your payment method options, instead of payment_method_types.

setup_future_usagestring

Indicates intent to use this payment method for future payments.

One of on_session or off_session.

Default: on_session

payoutboolean

Whether the payment method is being set up to receive payouts. Only payment method types that also support payouts for your account are allowed; others return an error.

Default: false

durationinteger

Lifetime of the setup session and of its client_secret, in minutes.

Default: 60

max_attemptsinteger

Maximum number of attempts allowed in the session.

Default: 5

return_urlstring

The URL the customer is redirected to after completing the setup (for example after a redirect-based payment method).

settlement_accountstring

Unique identifier for the settlement account to use, if you have several.

metadataobject

Set of key-value pairs attached to the object.

Returns

Returns the created setup session object.

idstringRequired

Unique identifier for the setup session.

resourcestringRequired

String representing the object's type.

One of setup_session.

billing_detailsobject or null
Show 2 child attributesHide child attributes
Option 1object

Billing information for the payment. Fields that were not provided are returned as null.

Show 6 child attributesHide child attributes
addressobject or null

Billing address, if available.

Show 2 child attributesHide child attributes
Option 1object

Address details.

Show 6 child attributesHide child attributes
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

Option 2null
namestring or null

Full name of the billing contact.

emailstring or null

Email address of the billing contact.

phonestring or null

Phone number of the billing contact, if available.

dobstring or null

Date of birth in YYYY-MM-DD format.

national_identification_numberstring or null

National identification number of the billing contact.

Option 2null
createdstring

Time at which the object was created, in ISO 8601 format.

client_secretstring

Client secret used with Pay.com.js to render the setup session. Only returned by the create call.

customerstring or null

Unique identifier of the Customer associated with this setup session, if applicable.

customer_reference_idstring or null

Your unique identifier for the customer, used to retrieve and manage saved payment methods.

failure_codestring or null

Error code explaining the reason for the setup session failure, if available.

Show 11 more attributesShow fewer attributes
failure_messagestring or null

Human-readable message explaining the reason for the setup session failure, if available.

metadataobject

Set of key-value pairs attached to the object.

payment_methodstring or null

Unique identifier of the Payment Method saved by this setup session.

payment_method_detailsobject or null
Show 2 child attributesHide child attributes
Option 1object

Details about the payment method at the time of the transaction.

Show 6 child attributesHide child attributes
typestring

The type of the payment method.

cardobject

Details about the card, if the payment method is a card.

Show 21 child attributesHide child attributes
binstring

The first six digits of the card number.

brandstring

The brand of the card.

One of visa, mastercard, amex, discover, unionpay, jcb or diners.

cardholder_currencystring

Three-letter ISO currency code of the cardholder's card, in lowercase.

countrystring

Two-letter ISO code representing the country of the card issuer.

exp_monthstring

Two-digit string representing the card's expiration month.

exp_yearstring

Four-digit string representing the card's expiration year.

fingerprintstring

Unique identifier for this card number, useful for detecting duplicate cards across customers.

fundingstring

The funding type of the card.

One of debit, credit, prepaid or unknown.

last4string

The last four digits of the card number.

networkstring

The card's brand, such as visa. The payment's network data is in underlying_network_details.

categorystring

Card category.

One of consumer or business.

security_checksobject

Results of security checks performed on the card.

Show 3 child attributesHide child attributes
address_line1_checkstring or null

Result of the AVS check for address line 1. Null when the acquirer returned no address result.

One of pass, fail, unavailable or unchecked.

address_postal_code_checkstring or null

Result of the AVS check for postal code. Null when the acquirer returned no address result.

One of pass, fail, unavailable or unchecked.

cvc_checkstring

Result of the CVC check. unchecked when the acquirer returned no result.

One of pass, fail, unavailable or unchecked.

walletobject or null

Details about the digital wallet used, if applicable.

Show 4 child attributesHide child attributes
typestring

Type of the digital wallet. One of googlepay, applepay, or ctp (Click to Pay).

One of googlepay, applepay or ctp.

googlepayobject

Google Pay details. Present when type is googlepay.

Show 2 child attributesHide child attributes
typestring

Google Pay authentication method. One of cryptogram_3ds (tokenized card) or pan_only (card stored in the Google account).

One of cryptogram_3ds or pan_only.

physical_card_last4string

The last four digits of the physical card behind the wallet token, if available.

applepayobject

Apple Pay details, if available.

Show 1 child attributeHide child attributes
physical_card_last4string

The last four digits of the physical card behind the wallet token.

ctpobject

Click to Pay details, if available.

Show 4 child attributesHide child attributes
physical_card_last4string

The last four digits of the physical card.

physical_card_binstring

The BIN of the physical card, if available.

physical_card_exp_monthstring

Expiration month of the physical card, if available.

physical_card_exp_yearstring

Expiration year of the physical card, if available.

tokenstring

Token identifier for the card payment method.

three_d_secureobject or null

Details about the 3D Secure authentication, if the payment used 3D Secure. Null otherwise. Not returned to accounts with the new 3D Secure fields enabled, which receive three_ds instead.

Show 2 child attributesHide child attributes
Option 1object

Populated if this payment used 3D Secure authentication. This is the default format; accounts with the new 3D Secure fields enabled receive three_ds instead.

Show 7 child attributesHide child attributes
authentication_flowstring or null

For authenticated transactions: how the customer was authenticated by the issuing bank, for example challenge or frictionless.

resultstring or null

Outcome of the 3D Secure authentication, for example success, failure or error.

result_reasonstring or null

Reason for the result. One of authenticated, rejected, processing_errors, out_of_scope, high_risk, invalid, network_not_supported, acquirer_not_supported, not_enrolled, unavailable, or unknown, if applicable.

versionstring or null

The version of 3D Secure that was used.

ecistring or null

ECI Indicator from the 3D Secure authentication.

cardholder_infostring or null

Text provided by the ACS/issuer to the cardholder during authentication, if applicable.

liability_shiftboolean

Whether the liability shift was applied.

Option 2null
three_dsobject or null

Details about the 3D Secure authentication in the new fields format, if the payment used 3D Secure. Only returned to accounts with the new 3D Secure fields enabled, instead of three_d_secure.

Show 2 child attributesHide child attributes
Option 1object

Populated if this payment used 3D Secure authentication. Returned as three_ds only for accounts with the new 3D Secure fields enabled; other accounts receive three_d_secure.

Show 14 child attributesHide child attributes
authentication_flowstring

For authenticated transactions: how the customer was authenticated by the issuing bank.

resultstring

Outcome of the 3D Secure authentication, for example success, failure or error.

result_reasonstring

Reason for the result. One of authenticated, rejected, processing_errors, out_of_scope, high_risk, invalid, network_not_supported, acquirer_not_supported, not_enrolled, unavailable, or unknown, if applicable.

status_reasonstring or null

Status reason code from the 3D Secure authentication.

protocol_versionstring

The version of 3D Secure that was used.

ecistring

ECI Indicator from the 3D Secure authentication.

cryptogramstring

Cryptogram from the 3D Secure authentication.

liability_shiftboolean

Whether the liability shift was applied.

cardholder_infostring or null

Text provided by the ACS/issuer to the cardholder during authentication.

acs_transaction_idstring

ACS Transaction ID from the 3D Secure authentication.

three_ds_server_transaction_idstring

3DS Server Transaction ID from the 3D Secure authentication.

ds_transaction_idstring

DS Transaction ID from the 3D Secure authentication.

aresstring

Authentication Response (ARes) from the 3D Secure authentication.

rreqstring

Requestor Response (RReq) from the 3D Secure authentication.

Option 2null
payoutstring or null

Whether the card can receive payouts. One of available or not_available, if known.

One of available or not_available.

name_verificationstring

Result of name verification using ANI (Account Name Inquiry). One of match, partial_match, no_match, not_performed, or not_supported.

One of match, partial_match, no_match, not_performed or not_supported.

partial_approvalobject or null

Details about the partial approval, if the transaction was partially approved. Null otherwise.

Show 2 child attributesHide child attributes
Option 1object

Details about the partial approval, if the transaction was partially approved.

Show 5 child attributesHide child attributes
statusstring

Status of the partial approval:

  • pending: the issuer approved a lower amount, and the payment waits for you to confirm or cancel it.
  • accepted: the lower amount was accepted.
  • canceled: the partial approval was canceled, and the payment wasn't completed.
  • rejected: a partial approval was requested, but the issuer declined the payment for insufficient funds instead. Its amounts are 0.

One of pending, accepted, canceled or rejected.

amount_requestedinteger

Amount requested, in the smallest currency unit.

amount_authorizedinteger

Amount authorized, in the smallest currency unit.

amount_chargedinteger

Amount charged, in the smallest currency unit.

product_idstring

Unique identifier of the product associated with the partial approval.

Option 2null
namestring

The cardholder's name. Only present for specific merchants.

issuerstring

Name of the card issuer. Only present for specific merchants.

cashappobject

Details about the Cash App account, if the payment method is Cash App.

Show 2 child attributesHide child attributes
cashtagstring

The Cash App account the customer set up.

namestring

Name of the Cash App account holder, if applicable.

referencestring or null

External reference to the payment method, if applicable.

setup_future_usagestring or null

The context in which this payment method was set up to be reused for future payments, if applicable. One of on_session or off_session.

One of on_session or off_session.

third_party_tokensarray of objects

Tokens for this card held by third-party providers (for example tokenex, stripe, centrobill or aptpay). Empty when there are none.

Show 5 child attributesHide child attributes
typestring

The third-party provider. The provider's details are in a field with the same name.

tokenexobject
Show 1 child attributeHide child attributes
tokenstring

The TokenEx token.

stripeobject
Show 3 child attributesHide child attributes
accountstring

The Stripe account.

customerstring

The Stripe customer.

payment_methodstring

The Stripe payment method.

centrobillobject
Show 3 child attributesHide child attributes
accountstring

The Centrobill account.

customerstring

The Centrobill customer.

sitestring

The Centrobill site.

aptpayobject
Show 1 child attributeHide child attributes
customerstring

The AptPay customer.

Option 2null
payment_method_optionsobject or null
Show 2 child attributesHide child attributes
Option 1object

Payment method specific configurations.

Show 15 child attributesHide child attributes
cardobject

Options for Card payments.

Show 20 child attributesHide child attributes
accepted_card_brandsarray of strings

List of card brands to accept for this payment.

accepted_card_fundingarray of strings

List of card funding to accept for this payment.

accepted_card_jurisdictionsarray of strings

List of payment jurisdictions to accept for this payment.

accepted_card_categoriesarray of strings

List of card categories to accept for this payment.

accepted_card_countriesarray of strings

List of card countries to accept for this payment.

accepted_eci_valuesarray of strings

List of ECI values to accept for this payment.

enforce_customer_name_as_cardholder_nameboolean

Whether to enforce the customer name as the card holder name.

security_checksobject

Configuration for security checks to perform.

Show 3 child attributesHide child attributes
address_line1_checkboolean

Whether to perform AVS check for address line 1.

address_postal_code_checkboolean

Whether to perform AVS check for postal code.

cvv_checkboolean

Whether to perform CVV check.

request_sca_exemptionobject

Options for requesting SCA exemption.

Show 4 child attributesHide child attributes
sca_exemption_typestring

Type of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.

One of low_value, transaction_risk_analysis or secure_corporate_process.

soft_decline_loopboolean

Whether to enable soft decline loop.

soft_decline_loop_decline_codesarray of strings

List of decline codes for soft decline loop.

soft_decline_loop_positioningstring

Controls when the soft decline loop runs relative to the provider fallback sequence. One of at_nearest or after_fallbacks.

One of at_nearest or after_fallbacks.

cvv_whitelistobject

CVV whitelist configuration.

Show 2 child attributesHide child attributes
enabledboolean

Whether CVV whitelist is enabled.

durationstring

Duration for CVV whitelist.

request_threed_securestring

How to request 3D Secure authentication for this payment. One of automatic, challenge, exemption, or none.

One of automatic, challenge, exemption or none.

account_billing_updaterobject

Options for the account billing updater, which refreshes stored card details when the issuer reports a change.

Show 3 child attributesHide child attributes
enabledboolean

Whether the account billing updater is enabled.

retry_after_updateboolean

Whether to retry a declined payment after the card details are updated.

billing_updater_decline_codesarray of strings

Decline codes that trigger an account billing update.

motoboolean

Whether the payment was a MOTO (mail order/telephone order) payment. Returned in responses.

duplicate_card_checkboolean

Whether to perform a duplicate card check and block (same card on more than 1 customer).

network_tokenobject

Options for network tokens for this payment.

Show 2 child attributesHide child attributes
provisionobject

Options that indicate how to provision network tokens.

Show 2 child attributesHide child attributes
enabledboolean

Whether to provision a network token during the payment.

decline_on_failureboolean

Whether to fail the payment if network token provisioning fails.

authorizationobject

Options that indicate how to use network token for this payment.

Show 3 child attributesHide child attributes
enabledboolean

Whether to use a network token for payment authorization.

full_pan_fallbackboolean

Whether to retry with the full PAN if authorization with the network token fails.

fallback_decline_codesarray of strings

Pay.com decline codes that trigger the full PAN retry, for example, do_not_honour. If not set, the default decline codes of the processor are used.

fundingboolean

Whether this payment is an AFT (account funding transaction) payment.

Default: false

pinless_debitobject

Options for pinless debit.

Show 1 child attributeHide child attributes
enabledboolean

Whether pinless debit is enabled.

partial_approvalobject

Options for partial approval.

Show 7 child attributesHide child attributes
acceptboolean

Whether to accept partial approvals.

allow_top_upboolean

Whether to allow top-up for partial approvals.

percentage_thresholdinteger

Percentage threshold for partial approval.

amount_thresholdinteger or string

Amount threshold for partial approval.

require_full_amountboolean

Whether to require full amount.

approved_by_defaultboolean

Whether partial approval is approved by default.

productsarray of objects

List of predefined products for partial approval.

Show 5 child attributesHide child attributes
amountnumberRequired

Amount for the product.

titlestringRequired

Title of the product.

descriptionstring

Description of the product.

imagestring

Image URL for the product.

idstring

Product ID.

advanced_fraud_screeningobject

Payment fraud screening options.

Show 3 child attributesHide child attributes
thresholdsarray of objects

Risk score ranges and the outcome to apply to each. The ranges must include an allow range, cover every score from 0 to 100 with no gaps or overlaps (each start is the previous end + 1), and be ordered by severity: a range with a higher score cannot have a less severe outcome than a lower range. Otherwise the request returns 400.

Show 3 child attributesHide child attributes
startintegerRequired

Range beginning for risk control outcome.

endintegerRequired

Range ending for risk control outcome.

outcomestringRequired

Outcome.

One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge or block.

enabledbooleanRequired

Whether advanced fraud screening is enabled for the payment.

learn_modeboolean

Whether advanced fraud screening runs in learn mode.

name_verificationobject

Options to configure the name verification process.

Show 4 child attributesHide child attributes
enabledboolean

Whether to perform name verification with ANI (Account Name Inquiry).

use_customer_nameboolean

Whether to use the customer name for verification with ANI.

accepted_resultsarray of strings

List of ANI results to accept. Each value is one of match, partial_match, no_match, not_performed, or not_supported.

accepted_results_by_fieldobject

ANI results to accept for each name field.

Show 4 child attributesHide child attributes
first_namearray of strings
last_namearray of strings
middle_namearray of strings
full_namearray of strings
us_bank_accountobject

Options for US bank account payments.

Show 4 child attributesHide child attributes
ach_typestring

ACH payment method.

One of next_day or same_day.

networkstring

Network.

One of rtp, ach or fednow.

ach_entrystring

ACH entity.

One of web, ccd, ppd or tel.

ach_fallbackboolean
paypalobject

Options for PayPal payments.

Show 1 child attributeHide child attributes
name_verificationboolean

Whether to perform customer name verification.

applepayobject

Options for Apple Pay payments.

Show 1 child attributeHide child attributes
collectionobject

Allow to enable/disable collection of specific details during a payment.

Show 5 child attributesHide child attributes
billing_addressobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

emailobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

nameobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

phone_numberobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

shipping_addressobject

Controls shipping details collection.

Show 2 child attributesHide child attributes
enabledboolean

Whether to collect shipping details.

include_phone_numberboolean

Whether to include a phone number in shipping details.

googlepayobject

Options for Google Pay payments.

Show 2 child attributesHide child attributes
collectionobject

Allow to enable/disable collection of specific details during a payment.

Show 5 child attributesHide child attributes
billing_addressobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

emailobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

nameobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

phone_numberobject

Data collection details.

Show 1 child attributeHide child attributes
enabledboolean

Whether to collect these details.

shipping_addressobject

Controls shipping details collection.

Show 3 child attributesHide child attributes
enabledboolean

Whether to collect shipping details.

include_phone_numberboolean

Whether to include a phone number in shipping details.

allowed_countriesarray of strings

List of countries to accept for this payment.

require_cryptogram_threed_secureboolean

Whether to require a 3D Secure cryptogram.

bank_accountobject

Options for bank account payments.

Show 1 child attributeHide child attributes
allowed_countriesarray of strings

List of countries to accept for this payment.

skrillobject

Verification feature configuration and matching rules.

Show 1 child attributeHide child attributes
verificationobject

Verification feature configuration.

Show 3 child attributesHide child attributes
enabledboolean

Whether the verification feature is enabled.

accepted_verification_level_valuesarray of strings

List of accepted verification levels.

require_match_for_customer_detailsobject

Field-level switches indicating which customer attributes must match between the submitted data and verified identity data in order to consider verification successful.

Show 6 child attributesHide child attributes
first_nameboolean

Whether to require an exact match on the customer's first name.

last_nameboolean

Whether to require an exact match on the customer's last name.

countryboolean

Whether to require an exact match on the customer's country/region.

postal_codeboolean

Whether to require an exact match on the customer's postal/ZIP code.

line1boolean

Whether to require an exact match on the first line of the street address.

dobboolean

Whether to require an exact match on the customer's date of birth.

netellerobject

Verification feature configuration and matching rules.

Show 1 child attributeHide child attributes
verificationobject

Verification feature configuration.

Show 3 child attributesHide child attributes
enabledboolean

Whether the verification feature is enabled.

accepted_verification_level_valuesarray of strings

List of accepted verification levels.

require_match_for_customer_detailsobject

Field-level switches indicating which customer attributes must match between the submitted data and verified identity data in order to consider verification successful.

Show 6 child attributesHide child attributes
first_nameboolean

Whether to require an exact match on the customer's first name.

last_nameboolean

Whether to require an exact match on the customer's last name.

countryboolean

Whether to require an exact match on the customer's country/region.

postal_codeboolean

Whether to require an exact match on the customer's postal/ZIP code.

line1boolean

Whether to require an exact match on the first line of the street address.

dobboolean

Whether to require an exact match on the customer's date of birth.

recurringobject

Terms of the recurring mandate the customer approves when a payment method that needs one (Pix Automático, UPI AutoPay) is saved for future payments. Used only when the payment saves the method. Each provider maps the terms to its own; terms it cannot express decline the payment.

Show 6 child attributesHide child attributes
intervalstring

How often the merchant charges. sporadic: no fixed schedule.

One of day, week, month, year or sporadic.

interval_countinteger

Number of intervals between charges. Defaults to 1.

amountinteger

Amount in the smallest currency unit. Defaults to the amount of the payment that saves the method.

amount_typestring

Whether every charge is exactly amount or at most amount.

One of exact or maximum.

start_datestring

First day the mandate can be charged, YYYY-MM-DD.

end_datestring

Last day the mandate can be charged, YYYY-MM-DD. Open-ended or the provider maximum when omitted.

cashappobject

Options for Cash App Pay payments.

Show 2 child attributesHide child attributes
name_verificationobject

Checks the customer's name against the Cash App account holder's name.

Show 2 child attributesHide child attributes
enabledboolean

Whether name verification is enabled.

similarity_acceptancestring

Minimum name similarity score to accept, as a fraction between 0 and 1.

phone_verificationobject

Checks the last four digits of the customer's phone number against the Cash App account.

Show 1 child attributeHide child attributes
enabledboolean

Whether phone verification is enabled.

statement_descriptor_suffixstring

Suffix for the statement descriptor of this payment. An empty string is accepted.

routing_methodologiesarray of strings

Routing methodologies applied to the payment. Returned in responses.

payment_method_config_idstring

Identifier of the payment method configuration applied to the payment, if applicable. Returned in responses.

payment_method_config_sourcestring

Source of the payment method configuration applied to the payment, if applicable. Returned in responses.

authentication_optionsobject

Authentication options for the payment method as provided in the request.

Show 3 child attributesHide child attributes
typestringRequired

Type of authentication. One of three_ds, three_ri, or bep.

One of three_ds, three_ri or bep.

three_dsobject

3D Secure authentication options. Only present when type is three_ds.

Show 2 child attributesHide child attributes
accepted_eci_valuesarray of strings

List of accepted ECI values. Each value is one of 00, 01, 02, 05, 06, or 07.

flow_indicatorobject

Flow indicator for 3D Secure authentication.

Show 3 child attributesHide child attributes
typestring

Type of 3D Secure flow. One of challenge, frictionless, or data_share.

One of challenge, frictionless or data_share.

challengeobject

Challenge flow options. Only present when type is challenge.

Show 2 child attributesHide child attributes
typestring

Type of challenge, such as mandated.

allow_frictionlessboolean

Whether to allow the frictionless flow as a fallback.

frictionlessobject

Frictionless flow options. Only present when type is frictionless.

Show 1 child attributeHide child attributes
sca_exemption_typestring

Type of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.

One of low_value, transaction_risk_analysis or secure_corporate_process.

three_riobject

3DS Requestor Initiated (3RI) authentication options. Only present when type is three_ri.

Show 2 child attributesHide child attributes
indicatorstring

3RI indicator. One of recurring or ucof.

One of recurring or ucof.

require_issuer_liability_shiftboolean

Whether to require an issuer liability shift.

Option 2null
payment_method_typesarray of strings

The list of payment method types allowed for this setup session. Defaults to the payment method types enabled in your payment method options.

setup_future_usagestring or null

Indicates intent to use this payment method for future payments. One of on_session or off_session.

One of on_session or off_session.

flow_directionsobject

The directions the payment method is being set up for.

Show 2 child attributesHide child attributes
paymentboolean

Whether the payment method can be used for payments.

payoutboolean

Whether the payment method is being set up to receive payouts (payout was true on create).

return_urlnull
test_modeboolean

Whether the setup session was created in the sandbox.

statusstring

Status of the setup session. One of open, completed, or failed (also used for expired sessions).

One of open, completed or failed.

Errors

400
Invalid request parameters.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
409
Another request with the same idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?