We understand that most merchants want to get on with selling their products, not implementing payment gateways. That’s why the G2A PAY API is designed to make the entire process fast and frustration-free.
Read on to learn how our payment service works and your options for integration.
How G2A PAY payments work
G2A PAY allows you start accepting more than 200 global and local payment methods, including credit cards, PayPal, and many more. Whichever payment method is used, payments follow a similar process.
This begins on your eCommerce platform (where your customer places an order) and continues on our checkout platform (where G2A PAY processes the payment and confirms a successful transaction).
Understanding the payment status
As your customer progresses from your shopping cart to the G2A PAY checkout and back again, the order is assigned a payment status at every stage. Almost all of these are communicated to your eCommerce platform via an Instant Payment Notification (IPN).
Please note that:
Possible transaction status:
In addition, while refunds can be configured manually using the REST API, the confirmation (status change) will be notified by IPN.
Creating your integration credentials
To start integrating G2A PAY, you will need a unique API key and a secret token. To get started, visit https://pay.g2a.com and go to Settings > Merchant.
For security, each REST API request needs to contain an authorization header. This is a simple HTTP header made up of two elements:
This is best illustrated with an example.
Authorization header example
First, we get the individual values we need
Combining these values and using a SHA256 checksum algorithm gives us the following result
We can then combine our
API_Hash and the algorithm result - separated by a semi-colon - to create our
Authorization: 485d733d-7937-414a-8d42-6781397b1c0a; 9a67827ae58f013ab22a87c94135d6ce79366cecb79f725f483643b3e2f148ca