This quickstart will show you how to quickly create and handle iDEAL payments with the PayPro API.
We will cover these steps:
- Create payment
- Handle payment
If you are not sure where to start. Check our Getting Started guide.
1. Create payment
In order to create a payment we need to call the
create_payment command. To do this we need a few lines of code:
The API will respond with a JSON object. The client will automatically convert this to a hash that contains the following fields:
First, we have the
payment_hash, this is the unique identifier of the payment. We can use the
payment_hash to make calls to the API that require a payment.
Second, we have the
payment_url. This URL serves two purposes. One, it will finalize the creation of the payment, and second, it will sent the customer to the the payment page. This can be the PayPro payment page or that of the payment method if all required information has been filled in.
In the example above, we set
ideal/INGBNL2A which means the customer will be redirected to the ING iDEAL page.
2. Handle payment
Now that we have created a payment, we can check its status through the API. We will use the
get_sale command for this.
This command returns a JSON object with all the information about the created payment.
For a more detailed list of all the different values, check out our API Reference.
You now should be able to create and check payments for your customers through the PayPro API. If you are interested in more detailed information about payments then feel free to check out our other guides.
Would you like additional support or do you have questions? Contact us.