In this guide you will find information about the payment methods that PayPro supports.
PayPro supports a wide selection of payment methods. The API gives you access to these payment methods, which allow you to create your own payment method selection forms. Futher, all payment creation API calls allow you to pre-select payment methods for even better user experiences.
List of Payment Methods
Below you will find a list of all supported payment methods.
Name
Code
API Calls
Note
Afterpay
afterpay/giro
create_payment create_product_payment
Requires to be enabled. See Guide for more information.
Bancontact
bancontact/mistercash
create_payment create_product_payment
iDEAL - ABN AMRO
ideal/ABNANL2A
create_payment create_product_payment
iDEAL - ASN Bank
ideal/ASNBNL21
create_payment create_product_payment
iDEAL - bunq
ideal/BUNQNL2A
create_payment create_product_payment
iDEAL - ING
ideal/INGBNL2A
create_payment create_product_payment
iDEAL - Knab
ideal/KNABNL2H
create_payment create_product_payment
iDEAL - Moneyou
ideal/MOYONL21
create_payment create_product_payment
iDEAL - Rabobank
ideal/RABONL2U
create_payment create_product_payment
iDEAL - RegioBank
ideal/RBRBNL21
create_payment create_product_payment
iDEAL - SNS Bank
ideal/SNSBNL2A
create_payment create_product_payment
iDEAL - Triodos Bank
ideal/TRIONL2U
create_payment create_product_payment
iDEAL - van Lanschot
ideal/FVLBNL22
create_payment create_product_payment
Mastercard
creditcard/mastercard
create_payment create_product_payment
Requires to be enabled. See Guide for more information.
PayPal
paypal/direct
create_payment create_product_payment
PayPal (recurring)
paypal/recurring
create_product_payment
Only used when creating recurring payments or subscriptions.
SEPA Bank Transfer
banktransfer/sepa
create_payment create_product_payment
SEPA Direct Debit
directdebit/sepa-once
create_payment create_product_payment
SEPA Recurring Debits
directdebit/sepa-recurring
create_product_payment
Only used when creating recurring payments or subscriptions.
Sofort (digital)
sofort/digital
create_product_payment
Used when selling digital products.
Sofort (physical)
sofort/physical
create_product_payment
Used when selling physical products.
Visa
creditcard/visa
create_product_payment
Requires to be enabled. See Guide for more information.
Getting payment methods
If you want to create your own payment form and you want to let your customers choose the payment method, you need a list of pay methods you want to support.
You could hardcode this, but a better way would be to get the payment methods from the API. This ensures any changes (for instance a new iDEAL bank) will also be reflected on your payment form.
You can do this with the get_all_pay_methods API command.
This API command returns a full list of payment methods for you to use.
RubyPHPPython
1
2
3
4
5
6
7
8
# First we create a client object with our API key.client=PayPro::Client.new('YOUR_API_KEY')# We use the `get_all_pay_methods` command.client.command='get_all_pay_methods'# Execute the command and store the response.response=client.execute
1
2
3
4
5
6
7
8
9
<?// First we create a client object with our API key.
$client=new\PayPro\Client('YOUR_API_KEY');// We use the `get_all_pay_methods` command.
$client->setCommand('get_all_pay_methods');// Execute the command and store the response.
$response=$client->execute();
1
2
3
4
5
6
7
8
# First we create a client object with our API key.client=Client('YOUR_API_KEY')# We use the `get_all_pay_methods` command.client.setCommand('get_all_pay_methods')# Execute the command and store the response.response=client.execute()
You can also get payment methods for specific product. This API call will only return the payment methods that are activated for this product.
For this you use the get_pay_methods command.
RubyPHPPython
1
2
3
4
5
6
7
8
9
10
11
# First we create a client object with our API key.client=PayPro::Client.new('YOUR_API_KEY')# We use the `get_all_pay_methods` command.client.command='get_all_pay_methods'# Set the product_id parameter.client.setParam('product_id',12345)# Execute the command and store the response.response=client.execute
1
2
3
4
5
6
7
8
9
10
11
12
<?// First we create a client object with our API key.
$client=new\PayPro\Client('YOUR_API_KEY');// We use the `get_pay_methods` command.
$client->setCommand('get_pay_methods');// Set the product_id parameter.
$client->setParam('product_id',12345);// Execute the command and store the response.
$response=$client->execute();
1
2
3
4
5
6
7
8
9
10
11
# First we create a client object with our API key.client=Client('YOUR_API_KEY')# We use the `get_all_pay_methods` command.client.setCommand('get_all_pay_methods')# Set the product_id parameter.client.setParam('product_id',12345)# Execute the command and store the response.response=client.execute()
The response format will be the same as with a get_all_pay_methods command.
Using payment methods
Normally, when you create payments and do not supply a pay_method parameter, the customer will be redirected to a PayPro payment page. On this page, the customer can choose what payment method he wants to use.
Depending on the situation, this might not be what you want and you already know the payment method before creating the payment. The create_payment and create_product_payment allow a parameter pay_method to solve this. You can use the payment methods listed earlier in this parameter.
For instance, if you want to sent the customer to Bancontact you can do the following.
RubyPHPPython
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# First we create a client object with our API key.client=PayPro::Client.new('YOUR_API_KEY')# We use the `create_payment` command.client.command='create_payment'# Set the create_payment parameters.client.params={# The parameters `amount` and `consumer_email` are required for a `create_payment` command.amount: 500,consumer_email: 'test@paypro.nl',# Set the payment method to Bancontactpay_method: 'bancontact/mistercash'}# Execute the command and store the response.response=client.execute
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?// First we create a client object with our API key.
$client=new\PayPro\Client('YOUR_API_KEY');// We use the `create_payment` command.
$client->setCommand('create_payment');// Set the product_id parameter.
$client->setParams([// The parameters `amount` and `consumer_email` are required for a `create_payment` command.
"amount"=>500,"consumer_email"=>"test@paypro.nl",// Set the payment method to Bancontact
"pay_method"=>"bancontact/mistercash"]);// Execute the command and store the response.
$response=$client->execute();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# First we create a client object with our API key.client=PayPro('YOUR_API_KEY')# We use the `create_payment` command.client.setCommand('create_payment')# Set the create_payment parameters.client.setParams({# The parameters `amount` and `consumer_email` are required for a `create_payment` command.'amount':500,'consumer_email':'test@paypro.nl',# Set the payment method to Bancontact'pay_method':'bancontact/mistercash'})# Execute the command and store the response.response=client.execute()
When you redirect the customer to the payment_url, it will be redirected to Bancontact and won't see the PayPro payment page.
Guidelines
These are some guidelines when using payment methods.
Caching get_all_pay_methods result
When using the get_all_pay_methods it is good practice to cache the results. The payment methods won't change often enough to do an API command each time a customer gets on your payment page. It also helps speeding up your payment form which is good for the conversion rate.