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

The payment_methods is a list of the payment methods you would like to accept.

Syntax:

<payment_methods> = list of <payment_method>
<payment_method>  = [sca-|scafallback-|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 or
  • nosca- - to specify the transaction should never use SCA.
  • scafallback- - to specify the transaction should use SCA if a first attempt without SCA fails. SCA fallback should only be used when not saving a card for future use, that is Checkout recurring sessions and charge sessions with the recurring flag set.

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:

IDDescriptionCapability
cardAll available debit / credit cardssingle + recurring
dankortDankortsingle + recurring
visaVISAsingle + recurring
visa_elecVISA Electronsingle + recurring
mcMasterCardsingle + recurring
amexAmerican Expresssingle + recurring
mobilepayMobilePay Onlinesingle
mobilepay_subscriptionsMobilePay Subscriptionsrecurring
viabillViaBillsingle
resursResurs Banksingle
swishSwishsingle
vippsVippssingle
dinersDiners Clubsingle + recurring
maestroMaestrosingle + recurring
laserLasersingle + recurring
discoverDiscoversingle + recurring
jcbJCBsingle + recurring
china_union_payChina Union Paysingle + recurring
ffkForbrugsforeningensingle + recurring
paypalPayPalsingle
applepayApple Paysingle
googlepayGoogle Paysingle
klarna_pay_laterKlarna Pay Latersingle
klarna_pay_nowKlarna Pay Nowsingle
klarna_slice_itKlarna Slice It!single
klarna_direct_bank_transferKlarna Direct Bank Transfersingle
klarna_direct_debitKlarna Direct Debitsingle
idealiDEALsingle
blikBLIKsingle
p24Przelewy24 (P24)single
verkkopankkiVerkkopankkisingle
giropaygiropaysingle
sepaSEPA Direct Debitsingle

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.