Introduction
Checkout allows you to specify which payment methods you would like to accept in your web shop.
You can either use pre-defined standard configurations, configured in the Reepay Administration (Configurations → Checkout), or you can send in specific payment methods for an individual session.
If you pre-define a configuration you only need to reference the configuration name and do not need to specify the payment methods explicitly, when you create a new checkout session.
SCA
Some payment methods allow an extra layer of security to authorize the user. For card payments 3D Secure is an additional authentication flow in addition to entering card details. For wallets like Apple Pay, Google Pay, MobilePay, Vipps and Swish, the extra authentication is built into the apps.
We refer to all of these security schemes as strong customer authentication (SCA).
Syntax of payment_methods
parameter
payment_methods
parameterThe payment_methods is a list of the payment methods you would like to accept.
Syntax:
<payment_methods> = list of <payment_method>
<payment_method> = [sca-|nosca-]<payment_name>
<payment_name> = The id of payment method, e.g. dankort
Example:
"payment_methods":["dankort", "visa"]
(Accept Dankort and Visa)
Additionally you can add a prefix to specify the behaviour of SCA. Add
sca-
- to specify the transaction must use SCA ornosca-
- to specify the transaction should never use SCA.
If no prefix is given, the default behaviour is to use SCA if it is enabled in the Reepay Administration and the card used is enrolled in an SCA scheme. Payments with unenrolled cards will fail when using sca-
. Notice that payments using unenrolled cards might not be subject to liability shift. The default behaviour can be changed in the administration, so the default becomes must use SCA.
Example:
"payment_methods":["visa", "sca-mc"]
(Accept VISA and MasterCard, but always enforce strong customer authentication for MasterCard)
The payment methods are read from left to right. Start with the general settings, and then add the more specialized settings. If you experience issues with a given card type you can, for example, force SCA
See more examples below: Checkout Payment Methods Examples
Payment methods
To specify all card types, you can use a convenient short-hand card
. This will automatically be expanded to all available debit/credit card types.
We currently support the following payment methods:
ID | Description | Capability |
---|---|---|
card | All available debit / credit cards | single recurring |
dankort | Dankort | single recurring |
visa | VISA | single recurring |
visa_elec | VISA Electron | single recurring |
mc | MasterCard | single recurring |
amex | American Express | single recurring |
mobilepay | MobilePay Online | single |
mobilepay_subscriptions | MobilePay Subscriptions | recurring |
viabill | ViaBill | single |
anyday | AnyDay | single |
resurs | Resurs Bank | single |
swish | Swish | single |
vipps | Vipps | single |
diners | Diners Club | single recurring |
maestro | Maestro | single recurring |
laser | Laser | single recurring |
discover | Discover | single recurring |
jcb | JCB | single recurring |
china_union_pay | China Union Pay | single recurring |
ffk | Forbrugsforeningen | single recurring |
paypal | PayPal | single |
applepay | Apple Pay | single recurring |
googlepay | Google Pay | single |
klarna_pay_later | Klarna Pay Later | single |
klarna_pay_now | Klarna Pay Now | single |
klarna_slice_it | Klarna Slice It! | single |
klarna_direct_bank_transfer | Klarna Direct Bank Transfer | single |
klarna_direct_debit | Klarna Direct Debit | single |
ideal | iDEAL | single |
blik | BLIK | single |
p24 | Przelewy24 (P24) | single |
verkkopankki | Verkkopankki | single |
giropay | giropay | single |
sepa | SEPA Direct Debit | single |
Examples
Force strong customer authentication for a given card type
card, sca-visa
Accept all debit/credit cards with default settings for SCA. For Visa transactions it must use 3D Secure or the transaction will fail.
Disable strong authentication for all card transactions
viabill, nosca-card
Accept Viabill and all debit/credit cards. Never use strong customer authentication for cards.
Complete charge example
Here is an example where payment methods are specified for a charge:
curl --request POST \
-u '<your_private_key>:' \
--url https://checkout-api.reepay.com/v1/session/charge \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"order":
{"handle":"order-12345",
"amount":100,
"currency":"DKK",
"customer":{
"email":"[email protected]",
"handle":"customer-1",
"first_name":"John",
"last_name":"Doe"}
},
"accept_url":"https://webshop.com/accept/order-12345",
"cancel_url":"https://webshop.com/decline/order-12345",
"payment_methods":["dankort", "visa"]
}'
Here we create a charge and specify only Dankort and Visa should be accept as a method of payment.