Payment flow with credit cards
The following payment methods are supported for the Credit/debit cards with 3DS flow: Visa, Visa Electron, Mastercard, Maestro, American Express, JCB, Discover, UnionPay, and Dankort.
While 3DS-related fields were not mandatory for the previous API versions, they are required starting with API 6.0 to fully support the regulations brought by PSD2 and SCA. We always recommend using the latest version of the API to benefit from the latest functionalities and best performance.
Availability
Available for all 2Checkout accounts.
Requirements
To place orders with credit/debit cards via API, merchants fall under the requirements of the Payment Card Industry's Security Standards Council and are required to provide proof of attestation for an SAQ-D questionnaire before activation of this feature.
If you want to use the 2Checkout API, contact 2Checkout for activation.
Payment method object structure
CardNumber
Required (string)
The number of credit/debit cards.
CardType
Optional (string)
Can be: Visa, Visa electron, Mastercard, Maestro, Amex, Discover, Dankort, Carte bancaire, JCB, Hypercard, Elo card.
ExpirationYear
Required (string)
Card expiration year.
ExpirationMonth
Required (string)
Card expiration month.
CCID
Required (string)
The CVV/card security code.
HolderName
Required (string)
Cardholder name.
Vendor3DSReturnURL
Required (string)
URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.
Vendor3DSCancelURL
Required (string)
URL address to which customers are redirected if the 3DS details were not validated or the order could not be authorized.
RecurringEnabled
Optional (boolean)
True or false, depending on whether the shoppers checked the subscription auto-renewal checkbox or not, during the purchase process.
Request sample
The full JSON used to place an order with credit cards would look like this:
The API will respond with the full order object (for orders placed successfully) or with an error message.
3D Secure Flow
For more information on the 3DS flow, refer to this article.
Last updated
Was this helpful?