API Documentation. See how easy it can be to add 200+ payment methods to your store.

A simple API for streamlined implementation

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).

Online Payment Flow Chart
  1. Your customer clicks the G2A PAY button in your shopping cart
  2. Customer selects a payment method and provides details in the G2A PAY checkout
  3. The G2A PAY checkout returns the customer to your order summary page along with the relevant payment status 

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).

Online Payment Status

Please note that:

  1. While starting an online payment transaction in the G2A PAY Checkout it has a NEW status.
  2. Status PENDING is not notified by IPN (Instant Payment Notification) – payment is in this status immediately after returning from the G2A PAY Checkout.
  3. Every status is notified by an IPN.
  4. Refunds can be triggered manually using the REST API, but the confirmation (status change) will be notified by IPN.

Possible transaction status: 

  • NEW - This is assigned to every new online payment transaction
  • PENDING This is not notified by an IPN, but indicates that the payment is being processed

  • COMPLETE – The payment was completed successfully
  • REJECTED – The payment was rejected
  • CANCELED – The payment was canceled
  • PARTIALLY REFUNDED – Part of the payment was refunded (for example, one item)
  • REFUNDEDThe payment was fully refunded

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:

  1. Your store API hash, which can be found on the merchant panel
  2. A second hash, which is generated by applying a SHA256 checksum algorithm to a string containing:
    1. Your store API hash (above)
    2. Your merchant email address (your G2A PAY account name)
    3. Your API secret token

This is best illustrated with an example.

Authorization header example

First, we get the individual values we need


Hash generation

Combining these values and using a SHA256 checksum algorithm gives us the following result


HTTP Header

We can then combine our API_Hash and the algorithm result - separated by a semi-colon - to create our HTTP header:

Authorization: 485d733d-7937-414a-8d42-6781397b1c0a;