Create a payment method
/payment_methodsCreates a payment method for a customer from raw card details, a network token, an Apple Pay or Google Pay token, or a Pay.com card token. Cards may be verified with the issuer.
Headers
AuthorizationstringRequiredidempotency-keystringA 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_idstringRequiredYour unique identifier for the customer that the payment method belongs to.
typestringRequiredPayment method type. Send the object with the same name (card, network_token, applepay, googlepay or token). Raw card, network token and wallet data require an API key enabled for raw card data; it is tokenized before it reaches the payment API.
risk_session_idstringA unique identifier for the risk session.
cardobjectRaw details of a card payment method. Required when type is card.
Show 9 child parametersHide child parameters
numberstringRequiredThe card number, as a string without any separators.
expiry_monthstringRequiredTwo-digit number representing the card's expiration month.
expiry_yearstringRequiredTwo or four-digit number representing the card's expiration year.
cvvstringCard security code. cvc is accepted as an alias.
Required when the CVV check is enabled (payment_method_options.card.security_checks.cvv_check in the request or in your account defaults), unless underlying_network_id is sent.
namestringCardholder's full name.
billing_addressobjectBilling address of the card. Used as the billing address when billing_details is not sent.
Show 6 child parametersHide child parameters
citystringCity, district, suburb, town, or village.
countrystringTwo-letter country code (ISO 3166-1 alpha-2).
line1stringAddress line 1 (for example, street, PO Box, or company name).
line2string or nullAddress line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.
postal_codestringZIP or postal code.
statestring or nullState, county, province, or region. Null is accepted and returned when not set.
three_dsobjectRequired information to process a payment that has been 3DS authenticated using a Third Party provider.
Show 6 child parametersHide child parameters
ecistringRequiredThe Electronic Commerce Indicator security level associated with the 3D Secure enrollment result.
cavvstringRequiredA Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure).
ds_trans_idstringThe 3D Secure directory server transaction identifier.
Required when version is 2.x.
acs_trans_idstringThe 3D Secure access control server transaction identifier, if applicable.
xidstringTransaction identifier resulting from authentication processing.
Required for 3DS version 1.0.0.
versionstringIndicates the version of 3D Secure that was used for authentication, for example 2.2.0.
three_riobject3DS Requestor Initiated (3RI) authentication data.
Show 4 child parametersHide child parameters
acs_transaction_idstringRequiredACS transaction ID of the initial authentication.
ds_transaction_idstringRequiredDS transaction ID of the initial authentication.
authentication_flowstringRequiredHow the initial authentication was performed. One of frictionless or challenge.
date_timestringRequiredTime at which the initial authentication occurred, in ISO 8601 format.
authentication_contextobjectShow 2 child parametersHide child parameters
customer_ip_addressstringCustomer IP address.
browser_detailsobjectCustomer browser details.
Show 9 child parametersHide child parameters
accept_headerstringRequiredExact content of the HTTP accept headers.
javascript_enabledbooleanRequiredWhether Javascript is enabled in browser.
languagestringRequiredBrowser language. Returned from navigator.language property from the HTML DOM API.
user_agentstringRequiredExact content of the HTTP user-agent header.
screen_widthintegerRequiredScreen width of a device. Obtained from cardholder browser using the screen.width property.
screen_heightintegerRequiredScreen height of a device. Obtained from cardholder browser using the screen.height property.
timezone_offsetstringRequiredOffset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.
java_enabledbooleanRequiredWhether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.
color_depthintegerRequiredColor depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.
tokenobjectA card token created by the Pay.com tokenization SDK. Required when type is token.
Show 3 child parametersHide child parameters
idstringRequiredThe card token (tok_card_ ID) created by the Pay.com tokenization SDK, or an external token stored for your account.
cvvstringCard security code, if you collected it.
authentication_contextobjectShow 2 child parametersHide child parameters
customer_ip_addressstringCustomer IP address.
browser_detailsobjectCustomer browser details.
Show 9 child parametersHide child parameters
accept_headerstringRequiredExact content of the HTTP accept headers.
javascript_enabledbooleanRequiredWhether Javascript is enabled in browser.
languagestringRequiredBrowser language. Returned from navigator.language property from the HTML DOM API.
user_agentstringRequiredExact content of the HTTP user-agent header.
screen_widthintegerRequiredScreen width of a device. Obtained from cardholder browser using the screen.width property.
screen_heightintegerRequiredScreen height of a device. Obtained from cardholder browser using the screen.height property.
timezone_offsetstringRequiredOffset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.
java_enabledbooleanRequiredWhether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.
color_depthintegerRequiredColor depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.
network_tokenobjectRaw network token details. The network token is tokenized before it reaches the payment API.
Show 8 child parametersHide child parameters
tokenstringRequiredThe network token (token PAN).
token_typestringRequiredOrigin of the network token. Use applepay or googlepay for a decrypted wallet token; the value is case-insensitive.
expiry_monthstringRequiredExpiry month of the token.
expiry_yearstringRequiredExpiry year of the token.
namestringCardholder's full name.
cryptogramstringCryptogram for the token (for example the TAVV or the wallet's online payment cryptogram).
three_dsobjectCryptogram or external 3D Secure result for the token. No field is required.
- With only
eciandcryptogram, the pair is stored as the token cryptogram (the same as sendingcryptogramat the top level). - With more fields, it is treated as the result of a 3D Secure authentication done with a third party;
cryptogramis then an alias forcavv.
Show 6 child parametersHide child parameters
cryptogramstringToken cryptogram, or an alias for cavv.
ecistringThe Electronic Commerce Indicator returned with the cryptogram or by the 3D Secure authentication.
cavvstringA Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure).
ds_trans_idstringThe 3D Secure directory server transaction identifier.
xidstringTransaction identifier resulting from 3D Secure 1 authentication processing.
versionstringThe version of 3D Secure used for authentication.
authentication_contextobjectShow 2 child parametersHide child parameters
customer_ip_addressstringCustomer IP address.
browser_detailsobjectCustomer browser details.
Show 9 child parametersHide child parameters
accept_headerstringRequiredExact content of the HTTP accept headers.
javascript_enabledbooleanRequiredWhether Javascript is enabled in browser.
languagestringRequiredBrowser language. Returned from navigator.language property from the HTML DOM API.
user_agentstringRequiredExact content of the HTTP user-agent header.
screen_widthintegerRequiredScreen width of a device. Obtained from cardholder browser using the screen.width property.
screen_heightintegerRequiredScreen height of a device. Obtained from cardholder browser using the screen.height property.
timezone_offsetstringRequiredOffset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.
java_enabledbooleanRequiredWhether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.
color_depthintegerRequiredColor depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.
googlepayobjectGoogle Pay payment token, sent exactly as Google Pay returns it in paymentMethodData.tokenizationData.token (parsed from its JSON string). Field names keep Google's camelCase.
Show 5 child parametersHide child parameters
signaturestringRequiredSignature that verifies the message came from Google.
protocolVersionstringRequiredVersion of the Google Pay encryption protocol used to create the token.
signedMessagestringRequiredThe encrypted payment data and its metadata, as a serialized JSON string.
intermediateSigningKeyobjectRequiredIntermediate signing key from Google, used with protocolVersion ECv2.
Show 2 child parametersHide child parameters
signedKeystringRequiredThe intermediate signing key, as a serialized JSON string.
signaturesarray of stringsSignatures that verify the intermediate signing key came from Google.
authentication_contextobjectShow 2 child parametersHide child parameters
customer_ip_addressstringCustomer IP address.
browser_detailsobjectCustomer browser details.
Show 9 child parametersHide child parameters
accept_headerstringRequiredExact content of the HTTP accept headers.
javascript_enabledbooleanRequiredWhether Javascript is enabled in browser.
languagestringRequiredBrowser language. Returned from navigator.language property from the HTML DOM API.
user_agentstringRequiredExact content of the HTTP user-agent header.
screen_widthintegerRequiredScreen width of a device. Obtained from cardholder browser using the screen.width property.
screen_heightintegerRequiredScreen height of a device. Obtained from cardholder browser using the screen.height property.
timezone_offsetstringRequiredOffset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.
java_enabledbooleanRequiredWhether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.
color_depthintegerRequiredColor depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.
applepayobjectApple Pay payment token. Send the paymentData object of the PKPaymentToken exactly as Apple returns it (field names keep Apple's camelCase), and optionally the token's paymentMethod object.
Show 6 child parametersHide child parameters
signaturestringRequiredSignature of the payment and header data, as a Base64-encoded string.
versionstringRequiredVersion of the Apple Pay payment token.
datastringRequiredEncrypted payment data, as a Base64-encoded string.
headerobjectRequiredAdditional version-dependent information used to decrypt and verify the payment.
Show 3 child parametersHide child parameters
publicKeyHashstringRequiredHash of the X.509 encoded public key bytes of the merchant's certificate, as a Base64-encoded string.
ephemeralPublicKeystringRequiredEphemeral public key bytes, as a Base64-encoded string.
transactionIdstringRequiredTransaction identifier generated on the device, as a hexadecimal string.
paymentMethodobjectThe paymentMethod object of the Apple Pay token, if available.
Show 3 child parametersHide child parameters
displayNamestringDescription of the card, suitable for display.
networkstringPayment network of the card.
typestringType of the card.
authentication_contextobjectShow 2 child parametersHide child parameters
customer_ip_addressstringCustomer IP address.
browser_detailsobjectCustomer browser details.
Show 9 child parametersHide child parameters
accept_headerstringRequiredExact content of the HTTP accept headers.
javascript_enabledbooleanRequiredWhether Javascript is enabled in browser.
languagestringRequiredBrowser language. Returned from navigator.language property from the HTML DOM API.
user_agentstringRequiredExact content of the HTTP user-agent header.
screen_widthintegerRequiredScreen width of a device. Obtained from cardholder browser using the screen.width property.
screen_heightintegerRequiredScreen height of a device. Obtained from cardholder browser using the screen.height property.
timezone_offsetstringRequiredOffset from UTC timezone in minutes. Obtained from cardholder browser using the getTimezoneOffset() method.
java_enabledbooleanRequiredWhether Java is enabled in browser. Obtained from cardholder browser using the navigator.javaEnabled property.
color_depthintegerRequiredColor depth of a device screen. Obtained from cardholder browser using the screen.colorDepth property.
Show 6 more parametersShow fewer parameters
billing_detailsobjectBilling information for the payment.
Show 11 child parametersHide child parameters
addressobjectAddress details.
Show 6 child parametersHide child parameters
citystringCity, district, suburb, town, or village.
countrystringTwo-letter country code (ISO 3166-1 alpha-2).
line1stringAddress line 1 (for example, street, PO Box, or company name).
line2string or nullAddress line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.
postal_codestringZIP or postal code.
statestring or nullState, county, province, or region. Null is accepted and returned when not set.
namestringFull name of the billing contact.
emailstringEmail address of the billing contact.
phonestringPhone number of the billing contact, preferably in E.164 format. The leading + is optional, and an empty string is accepted.
dobstringDate of birth in YYYY-MM-DD format.
national_identification_numberstringNational identification number of the billing contact.
ip_addressstringIP address (IPv4 or IPv6) of the customer. Used for tax calculation when no address is available.
tax_idsarray of objectsTax identifiers of the customer. Used for tax calculation.
Show 2 child parametersHide child parameters
typestringRequiredType of the tax identifier. One of eu_vat, gb_vat, us_ein, ca_gst_hst, ca_bn, au_abn, in_gst, or pl_nip.
valuestringRequiredValue of the tax identifier.
kyc_datestringTime at which the customer's KYC check was completed, in ISO 8601 format.
screening_datestringTime at which the customer was last screened, in ISO 8601 format.
signature_datestringTime at which the customer signed the agreement, in ISO 8601 format.
payment_method_optionsobjectPayment method specific configurations.
Show 14 child parametersHide child parameters
cardobjectOptions for Card payments.
Show 20 child parametersHide child parameters
accepted_card_brandsarray of stringsList of card brands to accept for this payment.
accepted_card_fundingarray of stringsList of card funding to accept for this payment.
accepted_card_jurisdictionsarray of stringsList of payment jurisdictions to accept for this payment.
accepted_card_categoriesarray of stringsList of card categories to accept for this payment.
accepted_card_countriesarray of stringsList of card countries to accept for this payment.
accepted_eci_valuesarray of stringsList of ECI values to accept for this payment.
enforce_customer_name_as_cardholder_namebooleanWhether to enforce the customer name as the cardholder name.
security_checksobjectConfiguration for security checks to perform.
Show 3 child parametersHide child parameters
address_line1_checkbooleanWhether to perform AVS check for address line 1.
address_postal_code_checkbooleanWhether to perform AVS check for postal code.
cvv_checkbooleanWhether to perform CVV check.
request_threed_securestringHow to request 3D Secure authentication for this payment. One of automatic, challenge, exemption, or none.
account_billing_updaterobjectOptions for the account billing updater, which refreshes stored card details when the issuer reports a change.
Show 3 child parametersHide child parameters
enabledbooleanWhether the account billing updater is enabled.
retry_after_updatebooleanWhether to retry a declined payment after the card details are updated.
billing_updater_decline_codesarray of stringsDecline codes that trigger an account billing update.
request_sca_exemptionobjectOptions for requesting SCA exemption.
Show 4 child parametersHide child parameters
sca_exemption_typestringType of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.
soft_decline_loopbooleanWhether soft decline loop is enabled.
soft_decline_loop_decline_codesarray of stringsList of decline codes for soft decline loop.
soft_decline_loop_positioningstringControls when the soft decline loop runs relative to the provider fallback sequence. One of at_nearest or after_fallbacks.
cvv_whitelistobjectCVV whitelist configuration.
Show 2 child parametersHide child parameters
enabledbooleanWhether CVV whitelist is enabled.
durationstringDuration for CVV whitelist.
duplicate_card_checkbooleanWhether to perform a duplicate card check and block (same card on more than 1 customer).
motobooleanWhether this payment is a MOTO (mail order/telephone order) payment.
fundingbooleanWhether this payment is an AFT (account funding transaction) payment.
pinless_debitobjectOptions for pinless debit.
Show 1 child parameterHide child parameters
enabledbooleanWhether pinless debit is enabled.
partial_approvalobjectOptions for partial approval.
Show 7 child parametersHide child parameters
acceptbooleanWhether to accept partial approvals.
allow_top_upbooleanWhether to allow top-up for partial approvals.
percentage_thresholdintegerPercentage threshold for partial approval.
amount_thresholdintegerAmount threshold for partial approval.
require_full_amountbooleanWhether to require the full amount.
approved_by_defaultbooleanWhether partial approval is approved by default.
productsarray of objectsList of predefined products for partial approval.
Show 5 child parametersHide child parameters
amountnumberRequiredAmount for the product.
titlestringRequiredTitle of the product.
descriptionstringDescription of the product.
imagestringImage URL for the product.
idstringProduct ID.
network_tokenobjectOptions for network tokens for this payment.
Show 2 child parametersHide child parameters
provisionobjectOptions that indicate how to provision network tokens.
Show 2 child parametersHide child parameters
enabledbooleanWhether to provision a network token during the payment.
decline_on_failurebooleanWhether to fail the payment if network token provisioning fails.
advanced_fraud_screeningobjectPayment fraud screening options.
Show 3 child parametersHide child parameters
thresholdsarray of objectsRisk 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
startintegerRequiredRange beginning for risk control outcome.
endintegerRequiredRange ending for risk control outcome.
outcomestringRequiredOutcome.
enabledbooleanRequiredWhether advanced fraud screening is enabled for the payment.
learn_modebooleanWhether advanced fraud screening runs in learn mode.
name_verificationobjectOptions to configure the name verification process.
Show 4 child parametersHide child parameters
enabledbooleanWhether to perform name verification with ANI (Account Name Inquiry).
use_customer_namebooleanWhether to use the customer name for verification with ANI.
accepted_resultsarray of stringsList of ANI results to accept. Each value is one of match, partial_match, no_match, not_performed, or not_supported.
accepted_results_by_fieldobjectANI results to accept for each name field.
Show 4 child parametersHide child parameters
first_namearray of stringslast_namearray of stringsmiddle_namearray of stringsfull_namearray of stringsus_bank_accountobjectOptions for US bank account payments.
Show 4 child parametersHide child parameters
ach_typestringACH payment method.
networkstringNetwork.
ach_entrystringACH entity.
ach_fallbackbooleanpaypalobjectOptions for PayPal payments.
Show 1 child parameterHide child parameters
name_verificationbooleanWhether to perform customer name verification.
applepayobjectOptions for Apple Pay payments.
Show 1 child parameterHide child parameters
collectionobjectAllow to enable/disable collection of specific details during a payment.
Show 5 child parametersHide child parameters
billing_addressobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
emailobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
nameobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
phone_numberobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
shipping_addressobjectControls shipping details collection.
Show 2 child parametersHide child parameters
enabledbooleanWhether to collect shipping details.
include_phone_numberbooleanWhether to include a phone number in shipping details.
googlepayobjectOptions for Google Pay payments.
Show 2 child parametersHide child parameters
collectionobjectAllow to enable/disable collection of specific details during a payment.
Show 5 child parametersHide child parameters
billing_addressobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
emailobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
nameobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
phone_numberobjectData collection details.
Show 1 child parameterHide child parameters
enabledbooleanWhether to collect these details.
shipping_addressobjectControls shipping details collection.
Show 3 child parametersHide child parameters
enabledbooleanWhether to collect shipping details.
include_phone_numberbooleanWhether to include a phone number in shipping details.
allowed_countriesarray of stringsList of countries to accept for this payment.
require_cryptogram_threed_securebooleanWhether to require a 3D Secure cryptogram.
bank_accountobjectOptions for bank account payments.
Show 1 child parameterHide child parameters
allowed_countriesarray of stringsList of countries to accept for this payment.
routing_methodologiesarray of stringsskrillobjectVerification feature configuration and matching rules.
Show 1 child parameterHide child parameters
verificationobjectVerification feature configuration.
Show 3 child parametersHide child parameters
enabledbooleanWhether the verification feature is enabled.
accepted_verification_level_valuesarray of stringsList of accepted verification levels.
require_match_for_customer_detailsobjectField-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_namebooleanWhether to require an exact match on the customer's first name.
last_namebooleanWhether to require an exact match on the customer's last name.
countrybooleanWhether to require an exact match on the customer's country/region.
postal_codebooleanWhether to require an exact match on the customer's postal/ZIP code.
line1booleanWhether to require an exact match on the first line of the street address.
dobbooleanWhether to require an exact match on the customer's date of birth.
netellerobjectVerification feature configuration and matching rules.
Show 1 child parameterHide child parameters
verificationobjectVerification feature configuration.
Show 3 child parametersHide child parameters
enabledbooleanWhether the verification feature is enabled.
accepted_verification_level_valuesarray of stringsList of accepted verification levels.
require_match_for_customer_detailsobjectField-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_namebooleanWhether to require an exact match on the customer's first name.
last_namebooleanWhether to require an exact match on the customer's last name.
countrybooleanWhether to require an exact match on the customer's country/region.
postal_codebooleanWhether to require an exact match on the customer's postal/ZIP code.
line1booleanWhether to require an exact match on the first line of the street address.
dobbooleanWhether to require an exact match on the customer's date of birth.
recurringobjectTerms 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
intervalstringHow often the merchant charges. sporadic: no fixed schedule.
interval_countintegerNumber of intervals between charges. Defaults to 1.
amountintegerAmount in the smallest currency unit. Defaults to the amount of the payment that saves the method.
amount_typestringWhether every charge is exactly amount or at most amount.
start_datestringFirst day the mandate can be charged, YYYY-MM-DD.
end_datestringLast day the mandate can be charged, YYYY-MM-DD. Open-ended or the provider maximum when omitted.
cashappobjectOptions for Cash App Pay payments.
Show 2 child parametersHide child parameters
name_verificationobjectChecks the customer's name against the Cash App account holder's name.
Show 2 child parametersHide child parameters
enabledbooleanWhether name verification is enabled.
similarity_acceptancestringMinimum name similarity score to accept, as a fraction between 0 and 1.
phone_verificationobjectChecks the last four digits of the customer's phone number against the Cash App account.
Show 1 child parameterHide child parameters
enabledbooleanWhether phone verification is enabled.
statement_descriptor_suffixstringSuffix for the statement descriptor of this payment. An empty string is accepted.
decline_recoveryobjectDecline recovery settings.
Show 1 child parameterHide child parameters
flex_factorobjectFlex Factor decline recovery.
Show 1 child parameterHide child parameters
enabledbooleanWhether Flex Factor decline recovery is enabled.
authentication_optionsobjectAuthentication 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
typestringRequiredType of authentication. One of three_ds, three_ri, or bep.
three_dsobject3D Secure authentication options. Required when type is three_ds, and not allowed otherwise.
Show 2 child parametersHide child parameters
accepted_eci_valuesarray of stringsList of accepted ECI values. Each value is one of 00, 01, 02, 05, 06, or 07.
flow_indicatorobjectFlow indicator for 3D Secure authentication.
Show 3 child parametersHide child parameters
typestringType of 3D Secure flow. One of challenge, frictionless, or data_share.
challengeobjectChallenge flow options. Only allowed when type is challenge.
Show 2 child parametersHide child parameters
typestringRequiredType of challenge, such as mandated.
allow_frictionlessbooleanWhether to allow the frictionless flow as a fallback.
frictionlessobjectFrictionless flow options. Only present when type is frictionless.
Show 1 child parameterHide child parameters
sca_exemption_typestringType of SCA exemption. One of low_value, transaction_risk_analysis, or secure_corporate_process.
three_riobject3DS Requestor Initiated (3RI) authentication options. Required when type is three_ri, and not allowed otherwise.
Show 2 child parametersHide child parameters
indicatorstring3RI indicator. One of recurring or ucof.
require_issuer_liability_shiftbooleanWhether to require an issuer liability shift.
settlement_accountstringUnique identifier for the settlement account to bind the payment method to, if you have several.
setup_future_usagestringIndicates that you intend to make future payments with this payment method that will be used in this Payment.
Possible enum values:
on_session
Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.
off_session
Use off_session if your customer may or may not be present in your checkout flow.
metadataobjectSet of key-value pairs attached to the object.
provision_network_tokenbooleanWhether to provision a network token for a card payment method.
When neither this field nor payment_method_options.card.network_token.provision.enabled is set, a network token is provisioned for every card sent without three_ds. payment_method_options.card.network_token.provision.enabled takes precedence over this field.
Returns
Returns the created payment method object.
idstringUnique identifier for the Payment Method resource.
typestring or nullThe type of the payment method, for example card, googlepay, applepay, paypal, us_bank_account or crypto.
resourcestringString representing the object's type.
billing_detailsobject or nullBilling information associated with the payment method.
Show 2 child attributesHide child attributes
Option 1objectBilling information for the payment. Fields that were not provided are returned as null.
Show 6 child attributesHide child attributes
addressobject or nullBilling address, if available.
Show 2 child attributesHide child attributes
Option 1objectAddress details.
Show 6 child attributesHide child attributes
citystringCity, district, suburb, town, or village.
countrystringTwo-letter country code (ISO 3166-1 alpha-2).
line1stringAddress line 1 (for example, street, PO Box, or company name).
line2string or nullAddress line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.
postal_codestringZIP or postal code.
statestring or nullState, county, province, or region. Null is accepted and returned when not set.
Option 2nullnamestring or nullFull name of the billing contact.
emailstring or nullEmail address of the billing contact.
phonestring or nullPhone number of the billing contact, if available.
dobstring or nullDate of birth in YYYY-MM-DD format.
national_identification_numberstring or nullNational identification number of the billing contact.
Option 2nullstatusstringStatus of the payment method. One of created, requires_authentication, failed_authentication, or requires_confirmation.
createdstringTime at which the object was created, in ISO 8601 format.
metadataobjectSet of key-value pairs attached to the object.
off_sessionbooleanWhether the payment method has a network transaction ID, so it can be used for merchant-initiated (off-session) payments.
Show 18 more attributesShow fewer attributes
referencestring or nullThe payment method's ID at the provider it was imported from, sent as reference on import, if applicable.
risk_assessment_detailsobject or nullRisk assessment of the verification of the payment method, if applicable.
Show 2 child attributesHide child attributes
Option 1objectDetails about the risk assessment performed on the transaction.
Show 8 child attributesHide child attributes
outcomestringThe risk assessment outcome. One of three_ds_exemption, three_ds_not_required, allow, require_three_ds, three_ds_challenge, or block.
outcome_sourcestringThe source of the risk assessment outcome. One of score, rule, or rules.
rule_idstringUnique identifier of the rule that triggered the outcome. Only present when outcome_source is rule.
rules_idarray of stringsList of rule IDs that triggered the outcome. Only present when outcome_source is rules.
scorestringThe risk assessment score. Only present when outcome_source is score.
flagsarray of stringsList of risk flags associated with the transaction.
bypassedarray of stringsList of rule IDs that were bypassed.
simulatedarray of stringsList of rule IDs that were simulated (dry-run rules whose conditions matched but did not affect the outcome).
Option 2nullunderlying_network_idstring or nullUnique transaction identifier assigned by the card network, if applicable.
underlying_network_detailsobject or nullDetails about the underlying network transaction, if applicable.
Show 2 child attributesHide child attributes
Option 1objectDetails about the underlying network transaction.
Show 8 child attributesHide child attributes
networkstringThe card network that processed the transaction.
visaobjectVisa-specific network details.
Show 10 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Visa transaction.
raw_response_codestringRaw response code from Visa network.
payment_account_referencestringPayment Account Reference (PAR) for Visa transaction.
rrnstringRetrieval Reference Number for Visa transaction.
advice_codestringAdvice code for Visa transaction.
ecistringElectronic Commerce Indicator (ECI) for Visa transaction.
acistringAuthorization Characteristics Indicator (ACI) for Visa transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for Visa transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Visa transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
mastercardobjectMastercard-specific network details.
Show 11 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Mastercard transaction.
raw_response_codestringRaw response code from Mastercard network.
rrnstringRetrieval Reference Number for Mastercard transaction.
advice_codestringMerchant Advice Code (MAC) from Mastercard, as the issuer sent it, for example 02 (cannot approve at this time, try again later) or 03 (do not try again). See Mastercard merchant advice codes for every code and when to retry.
ecistringElectronic Commerce Indicator (ECI) for Mastercard transaction.
acistringAuthorization Characteristics Indicator (ACI) for Mastercard transaction.
ucafstringUCAF indicator for Mastercard Identity Check transactions.
payment_account_referencestringPayment Account Reference (PAR) for Mastercard transaction.
transaction_link_idstringTransaction Link ID assigned by Mastercard for this transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Mastercard transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
amexobjectAmerican Express-specific network details.
Show 10 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Amex transaction.
raw_response_codestringRaw response code from Amex network.
rrnstringRetrieval Reference Number for Amex transaction.
advice_codestringAdvice code for Amex transaction.
ecistringElectronic Commerce Indicator (ECI) for Amex transaction.
acistringAuthorization Characteristics Indicator (ACI) for Amex transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for Amex transaction.
payment_account_referencestringPayment Account Reference (PAR) for Amex transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Amex transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
discoverobjectDiscover-specific network details.
Show 10 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Discover transaction.
raw_response_codestringRaw response code from Discover network.
rrnstringRetrieval Reference Number for Discover transaction.
advice_codestringAdvice code for Discover transaction.
ecistringElectronic Commerce Indicator (ECI) for Discover transaction.
acistringAuthorization Characteristics Indicator (ACI) for Discover transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for Discover transaction.
payment_account_referencestringPayment Account Reference (PAR) for Discover transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Discover transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
visa_directobjectVisa Direct-specific network details.
Show 10 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Visa Direct transaction.
raw_response_codestringRaw response code from Visa Direct network.
rrnstringRetrieval Reference Number for Visa Direct transaction.
advice_codestringAdvice code for Visa Direct transaction.
ecistringElectronic Commerce Indicator (ECI) for Visa Direct transaction.
acistringAuthorization Characteristics Indicator (ACI) for Visa Direct transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for Visa Direct transaction.
payment_account_referencestringPayment Account Reference (PAR) for Visa Direct transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Visa Direct transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
mastercard_sendobjectMastercard Send-specific network details.
Show 11 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for Mastercard Send transaction.
raw_response_codestringRaw response code from Mastercard Send network.
rrnstringRetrieval Reference Number for Mastercard Send transaction.
advice_codestringAdvice code for Mastercard Send transaction.
ecistringElectronic Commerce Indicator (ECI) for Mastercard Send transaction.
acistringAuthorization Characteristics Indicator (ACI) for Mastercard Send transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for Mastercard Send transaction.
payment_account_referencestringPayment Account Reference (PAR) for Mastercard Send transaction.
transaction_link_idstringTransaction Link ID assigned by Mastercard for this Mastercard Send transaction.
aniobjectAccount Name Inquiry (ANI) verification details for Mastercard Send transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
jcbobjectJCB-specific network details.
Show 10 child attributesHide child attributes
arnstringThe acquirer reference number (ARN), which the acquirer assigns at clearing. Until the transaction clears, it can hold another reference from the acquirer, such as an RRN, or be absent. Pay.com sends charge.updated or refund.updated when the ARN arrives or changes.
auth_codestringAuthorization code for JCB transaction.
raw_response_codestringRaw response code from JCB network.
rrnstringRetrieval Reference Number for JCB transaction.
advice_codestringAdvice code for JCB transaction.
ecistringElectronic Commerce Indicator (ECI) for JCB transaction.
acistringAuthorization Characteristics Indicator (ACI) for JCB transaction.
ucafstringUniversal Cardholder Authentication Field (UCAF) for JCB transaction.
payment_account_referencestringPayment Account Reference (PAR) for JCB transaction.
aniobjectAccount Name Inquiry (ANI) verification details for JCB transaction.
Show 5 child attributesHide child attributes
statusstringANI verification status code.
full_namestringFull name match status code.
first_namestringFirst name match status code.
middle_namestringMiddle name match status code.
last_namestringLast name match status code.
Option 2nullcustomerstring or nullUnique identifier of the Customer associated with this payment method, if applicable.
customer_reference_idstring or nullYour unique identifier for the customer associated with this payment method.
flow_directionsobjectSupported payment flow directions for this payment method.
Show 2 child attributesHide child attributes
paymentbooleanWhether the payment method can be used for payments.
payoutbooleanWhether the payment method can be used for payouts.
test_modebooleanWhether the payment method was created in the sandbox.
cardobjectDetails for card, Google Pay and Apple Pay payment methods. The 3D Secure result of the verification is in card.three_d_secure.
Show 21 child attributesHide child attributes
binstringThe first six digits of the card number.
brandstringThe brand of the card.
cardholder_currencystringThree-letter ISO currency code of the cardholder's card, in lowercase.
countrystringTwo-letter ISO code representing the country of the card issuer.
exp_monthstringTwo-digit string representing the card's expiration month.
exp_yearstringFour-digit string representing the card's expiration year.
fingerprintstringUnique identifier for this card number, useful for detecting duplicate cards across customers.
fundingstringThe funding type of the card.
last4stringThe last four digits of the card number.
networkstringThe card's brand, such as visa. The payment's network data is in underlying_network_details.
categorystringCard category.
security_checksobjectResults of security checks performed on the card.
Show 3 child attributesHide child attributes
address_line1_checkstring or nullResult of the AVS check for address line 1. Null when the acquirer returned no address result.
address_postal_code_checkstring or nullResult of the AVS check for postal code. Null when the acquirer returned no address result.
cvc_checkstringResult of the CVC check. unchecked when the acquirer returned no result.
walletobject or nullDetails about the digital wallet used, if applicable.
Show 4 child attributesHide child attributes
typestringType of the digital wallet. One of googlepay, applepay, or ctp (Click to Pay).
googlepayobjectGoogle Pay details. Present when type is googlepay.
Show 2 child attributesHide child attributes
typestringGoogle Pay authentication method. One of cryptogram_3ds (tokenized card) or pan_only (card stored in the Google account).
physical_card_last4stringThe last four digits of the physical card behind the wallet token, if available.
applepayobjectApple Pay details, if available.
Show 1 child attributeHide child attributes
physical_card_last4stringThe last four digits of the physical card behind the wallet token.
ctpobjectClick to Pay details, if available.
Show 4 child attributesHide child attributes
physical_card_last4stringThe last four digits of the physical card.
physical_card_binstringThe BIN of the physical card, if available.
physical_card_exp_monthstringExpiration month of the physical card, if available.
physical_card_exp_yearstringExpiration year of the physical card, if available.
tokenstringToken identifier for the card payment method.
three_d_secureobject or nullDetails 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 1objectPopulated 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 nullFor authenticated transactions: how the customer was authenticated by the issuing bank, for example challenge or frictionless.
resultstring or nullOutcome of the 3D Secure authentication, for example success, failure or error.
result_reasonstring or nullReason 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 nullThe version of 3D Secure that was used.
ecistring or nullECI Indicator from the 3D Secure authentication.
cardholder_infostring or nullText provided by the ACS/issuer to the cardholder during authentication, if applicable.
liability_shiftbooleanWhether the liability shift was applied.
Option 2nullthree_dsobject or nullDetails 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 1objectPopulated 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_flowstringFor authenticated transactions: how the customer was authenticated by the issuing bank.
resultstringOutcome of the 3D Secure authentication, for example success, failure or error.
result_reasonstringReason 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 nullStatus reason code from the 3D Secure authentication.
protocol_versionstringThe version of 3D Secure that was used.
ecistringECI Indicator from the 3D Secure authentication.
cryptogramstringCryptogram from the 3D Secure authentication.
liability_shiftbooleanWhether the liability shift was applied.
cardholder_infostring or nullText provided by the ACS/issuer to the cardholder during authentication.
acs_transaction_idstringACS Transaction ID from the 3D Secure authentication.
three_ds_server_transaction_idstring3DS Server Transaction ID from the 3D Secure authentication.
ds_transaction_idstringDS Transaction ID from the 3D Secure authentication.
aresstringAuthentication Response (ARes) from the 3D Secure authentication.
rreqstringRequestor Response (RReq) from the 3D Secure authentication.
Option 2nullpayoutstring or nullWhether the card can receive payouts. One of available or not_available, if known.
name_verificationstringResult of name verification using ANI (Account Name Inquiry). One of match, partial_match, no_match, not_performed, or not_supported.
partial_approvalobject or nullDetails about the partial approval, if the transaction was partially approved. Null otherwise.
Show 2 child attributesHide child attributes
Option 1objectDetails about the partial approval, if the transaction was partially approved.
Show 5 child attributesHide child attributes
statusstringStatus 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.
amount_requestedintegerAmount requested, in the smallest currency unit.
amount_chargedintegerAmount charged, in the smallest currency unit.
product_idstringUnique identifier of the product associated with the partial approval.
Option 2nullnamestringThe cardholder's name. Only present for specific merchants.
issuerstringName of the card issuer. Only present for specific merchants.
paypalobjectDetails for PayPal payment methods.
Show 3 child attributesHide child attributes
emailstringThe PayPal account email address.
firstNamestringThe PayPal account holder's first name.
lastNamestringThe PayPal account holder's last name.
cashappobjectDetails for Cash App payment methods.
Show 2 child attributesHide child attributes
cashtagstringThe Cash App account the customer set up.
namestringName of the Cash App account holder, if applicable.
us_bank_accountobjectDetails for US bank account payment methods.
Show 10 child attributesHide child attributes
countrystringTwo-letter ISO country code (ISO 3166-1 alpha-2) of the bank.
currencystringThree-letter ISO currency code of the bank account.
last4stringThe last four digits of the bank account number.
account_holder_namestringThe name of the account holder.
account_holder_typestringThe type of entity that holds the account.
routing_numberstringThe routing number of the bank.
fingerprintstringUnique identifier for this bank account, useful for detecting duplicates.
bank_namestringThe name of the bank.
account_typestringThe type of bank account.
sourcestringThe source of the bank account information.
in_bank_accountobjectDetails for India bank account payment methods.
Show 10 child attributesHide child attributes
countrystringTwo-letter ISO country code (ISO 3166-1 alpha-2) of the bank.
currencystringThree-letter ISO currency code of the bank account.
last4stringThe last four digits of the bank account number.
account_holder_namestringThe name of the account holder.
account_holder_typestringThe type of entity that holds the account.
routing_numberstringThe routing number of the bank.
fingerprintstringUnique identifier for this bank account, useful for detecting duplicates.
bank_namestringThe name of the bank.
account_typestringThe type of bank account.
sourcestringThe source of the bank account information.
eu_bank_accountobjectDetails for EU bank account payment methods.
Show 10 child attributesHide child attributes
countrystringTwo-letter ISO country code (ISO 3166-1 alpha-2) of the bank.
currencystringThree-letter ISO currency code of the bank account.
last4stringThe last four digits of the bank account number.
account_holder_namestringThe name of the account holder.
account_holder_typestringThe type of entity that holds the account.
routing_numberstringThe routing number of the bank.
fingerprintstringUnique identifier for this bank account, useful for detecting duplicates.
bank_namestringThe name of the bank.
account_typestringThe type of bank account.
sourcestringThe source of the bank account information.
uk_bank_accountobjectDetails for UK bank account payment methods.
Show 10 child attributesHide child attributes
countrystringTwo-letter ISO country code (ISO 3166-1 alpha-2) of the bank.
currencystringThree-letter ISO currency code of the bank account.
last4stringThe last four digits of the bank account number.
account_holder_namestringThe name of the account holder.
account_holder_typestringThe type of entity that holds the account.
routing_numberstringThe routing number of the bank.
fingerprintstringUnique identifier for this bank account, useful for detecting duplicates.
bank_namestringThe name of the bank.
account_typestringThe type of bank account.
sourcestringThe source of the bank account information.
cryptoobjectDetails for crypto payment methods.
ecopayzobjectDetails for ecoPayz payment methods.
fonixobjectDetails for Fonix payment methods.
Errors
400payment_method_error), including when 3RI authentication is not supported.401invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).403resource_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.409idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.422token.id is an external token that is not stored for your account (No card was found for external payment method id).500503Retry-After, or after a few seconds when there's none.