Create a linked authentication session
/sessions/authentication/linkedCreates a 3D Secure authentication session linked to an existing charge, hold, or payment method.
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
resourcestringRequiredUnique identifier of the charge, hold, or payment method to authenticate.
return_urlstringRequiredURL to redirect the customer to after authentication completes. Should be an absolute URL.
confirmbooleanWhether to automatically confirm the related transaction after successful authentication.
durationintegerLifetime of the authentication session, in minutes.
Returns
Returns the authentication session object, with status open, the client_secret and the url to send the customer to.
idstringRequiredUnique identifier for the authentication session.
resourcestringRequiredString representing the object's type.
amountintegerRequiredAmount, in the smallest currency unit.
amount_human_readablestringRequiredAmount in human-readable format.
billing_detailsobject or nullShow 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 2nullchargestring or nullUnique identifier of the Charge linked to this authentication session, for a linked authentication session whose payment succeeded.
currencystringRequiredThree-letter ISO currency code, in lowercase.
createdstringTime at which the object was created, in ISO 8601 format.
Show 15 more attributesShow fewer attributes
customerstring or nullUnique identifier of the Customer associated with this authentication session, if applicable.
customer_reference_idstring or nullYour unique identifier for the customer, if applicable.
client_secretstringClient secret (a JWT) used to render the authentication session. Only returned when the session is created. It is also embedded in url.
holdstring or nullUnique identifier of the Hold linked to this authentication session, for a linked authentication session whose payment succeeded.
metadataobjectSet of key-value pairs attached to the object.
payment_methodstring or nullUnique identifier of the Payment Method used in this authentication session, if applicable.
payment_method_detailsobject or nullDetails about the payment method used in this authentication session, if applicable.
Show 3 child attributesHide child attributes
typestringThe type of the payment method.
cardobjectDetails about the card used for the payment.
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.
referencestring or nullExternal reference to the payment method, if applicable.
return_urlstring or nullURL to redirect the customer to after the authentication is performed.
shippingobject or nullShow 2 child attributesHide child attributes
Option 1objectShipping information for the payment.
Show 3 child attributesHide child attributes
addressobjectAddress 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.
namestringFull name of the recipient.
phonestringPhone number of the recipient, preferably in E.164 format. The leading + is optional.
Option 2nullreferencestring or nullA string to reference the authentication session, if set.
statusstringRequiredStatus of the authentication session. One of open, authenticated, or failed.
test_modebooleanWhether the authentication session was created in the sandbox.
urlstring or nullURL to redirect the customer to in order to perform the authentication. It contains the client secret. Null when no client secret was issued.
three_d_secure_detailsobject or nullResult of the 3D Secure authentication (default format, with flow, version and ds_trans_id). Null until the customer is authenticated. Not returned to accounts with the new 3D Secure fields enabled, which receive three_ds instead.
Show 2 child attributesHide child attributes
Option 1object3D Secure authentication result of an authentication session.
- In
authentication_details.three_ds(standalone sessions) and inthree_ds(authentication sessions, for accounts with the new 3D Secure fields enabled), the result usesauthentication_flow,protocol_version,ds_transaction_id,acs_transaction_id,three_ds_server_transaction_id,aresandrreq. - In
three_d_secure_details(authentication sessions, default format), it usesflow,versionandds_trans_idinstead.
cavv, xid, eci, cardholder_info and status_reason appear in both formats. Values that are not available are null.
Show 15 child attributesHide child attributes
cavvstring or nullCardholder Authentication Verification Value (CAVV), the cryptogram returned by the 3D Secure authentication.
xidstring or nullTransaction identifier from 3D Secure 1 authentication, if applicable.
ecistring or nullElectronic Commerce Indicator returned by the authentication, for example 05 or 06.
cardholder_infostring or nullText provided by the ACS/issuer to the cardholder during authentication, if any.
status_reasonstring or nullReason code when authentication failed or was not completed, if applicable.
authentication_flowstring or nullFlow performed, for example challenge or frictionless. New format only.
protocol_versionstring or null3D Secure protocol version used. New format only.
ds_transaction_idstring or nullDirectory Server transaction ID. New format only.
acs_transaction_idstring or nullACS transaction ID. New format only.
three_ds_server_transaction_idstring or nullTransaction ID assigned by the 3DS Server. New format only.
aresstring or nullRaw Authentication Response (ARes) returned by the ACS, as a JSON string. New format only.
rreqstring or nullRaw Results Request (RReq) from the ACS, as a JSON string. New format only.
flowstring or nullFlow performed, for example challenge or frictionless. Default format only.
versionstring or null3D Secure protocol version used. Default format only.
ds_trans_idstring or nullDirectory Server transaction ID. Default format only.
Option 2nullthree_dsobject or nullResult of the 3D Secure authentication in the new fields format. Only returned to accounts with the new 3D Secure fields enabled, instead of three_d_secure_details.
Show 2 child attributesHide child attributes
Option 1object3D Secure authentication result of an authentication session.
- In
authentication_details.three_ds(standalone sessions) and inthree_ds(authentication sessions, for accounts with the new 3D Secure fields enabled), the result usesauthentication_flow,protocol_version,ds_transaction_id,acs_transaction_id,three_ds_server_transaction_id,aresandrreq. - In
three_d_secure_details(authentication sessions, default format), it usesflow,versionandds_trans_idinstead.
cavv, xid, eci, cardholder_info and status_reason appear in both formats. Values that are not available are null.
Show 15 child attributesHide child attributes
cavvstring or nullCardholder Authentication Verification Value (CAVV), the cryptogram returned by the 3D Secure authentication.
xidstring or nullTransaction identifier from 3D Secure 1 authentication, if applicable.
ecistring or nullElectronic Commerce Indicator returned by the authentication, for example 05 or 06.
cardholder_infostring or nullText provided by the ACS/issuer to the cardholder during authentication, if any.
status_reasonstring or nullReason code when authentication failed or was not completed, if applicable.
authentication_flowstring or nullFlow performed, for example challenge or frictionless. New format only.
protocol_versionstring or null3D Secure protocol version used. New format only.
ds_transaction_idstring or nullDirectory Server transaction ID. New format only.
acs_transaction_idstring or nullACS transaction ID. New format only.
three_ds_server_transaction_idstring or nullTransaction ID assigned by the 3DS Server. New format only.
aresstring or nullRaw Authentication Response (ARes) returned by the ACS, as a JSON string. New format only.
rreqstring or nullRaw Results Request (RReq) from the ACS, as a JSON string. New format only.
flowstring or nullFlow performed, for example challenge or frictionless. Default format only.
versionstring or null3D Secure protocol version used. Default format only.
ds_trans_idstring or nullDirectory Server transaction ID. Default format only.
Option 2nullErrors
400401invalid_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.404409idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.500503Retry-After, or after a few seconds when there's none.