Skip to main content

Display payment methods

By default Rootline will show all payment methods available for the account the payment is initiated for. However, with the display_payment_methods array, you can list and show in the Checkout a subset of the configured payment methods with every individual payment request.

For instance, if you only want show cards payment methods to a customer, you include the display_payment_methods as follows in the payment request:

Sample request with a list displayable payment methods
curl 'http://payment-api.staging.rootline.com/v1/payments' \
--request POST \
--header 'content-type: application/json' \
--header 'x-api-key: [paste-your-api-key]' \
--header 'rootline-version: 2024-04-23' \
--data '{
"account_id": "[platform-account-id]",
"reference": "your-reference",
"amount": {
"currency": "EUR",
"quantity": "10.00"
},
"display_payment_methods":[
"mastercard",
"visa",
"ideal"
],
"return_url": "https://rootline.com/[PAYMENT_ID]"
}'