Receipt Invoice Callback

IIntroduction

The Invoice Callback functionality is designed to provide real-time updates about changes in the status of invoices and their associated payment transactions. By including the callback_url parameter when creating an invoice, you can ensure that a POST request is sent to the specified URL upon changes in the invoice status or upon the completion or cancellation of a payment transaction associated with the invoice.

The callback_url Parameter

When creating an invoice, including the callback_url parameter in your request will trigger the delivery of a POST request to the specified URL whenever there are changes in the invoice status or upon the completion or cancellation of a payment transaction linked to the invoice.

Callback Structure

The callback sent to the specified callback_url will have the following structure:

{
  "invoice": {
    "uid": "5023a4f7-178b-4322-a3ce-75610b6c1ef7",
    "type": "DEPOSIT",
    "currency": "EUR",
    "amount": "10.550000000000000000",
    "receivedAmount": "10.5183500000",
    "paymentId": "17589371",
    "orderId": "ff3e78ba-8d",
    "status": "SUCCESS",
    "transactionParams": {
      "lang": "en",
      "amount": "10.55",
      "params": {
        "user_id": "36",
        "user_email": "mail@gmail.com",
        "flag_get_url": "1"
      },
      "redirectContinue": "http://test.com/success"
    },
    "api_key": "4dc2e200-6aa383cf",
    "currency": "EUR",
    "reference": "5023a4f7-178b-4322-a3ce-75610b6c1ef7",
    "expiration": "2023-10-11 21:48",
    "description": "EUR deposit",
    "failure_url": "http://site.com/fail",
    "success_url": "http://site.com/success"
  },
  "createdAt": "1697046501"
}

Signature Verification

The signature field in the callback is formed using the same algorithm as for regular API requests. You should use this signature along with the provided api-key to verify the authenticity of the callback data.

By utilizing the Invoice Callback functionality, you can receive real-time updates about changes in the status of your invoices and payment transactions, enhancing your ability to efficiently manage and track payment operations.

Continuous Callback Delivery

POST requests are sent every minute until a 200 status code is received from the receiving callback endpoint.

Fields Sent in Callback

  • uid: Transaction ID in the E-Gates system.

  • type: Payment type (DEPOSIT/ WITHDRAWAL).

  • currency: Payment currency.

  • amount: Payment amount.

  • receivedAmount: Amount credited to the balance after deducting fees.

  • paymentId: Transaction ID on the payment gateway.

  • orderId: Transaction ID specified when creating the payment.

  • status: Payment status (SUCCESS/CANCELED).

  • transactionParams: Payment parameters passed via the API during creation.

  • createdAt: Payment creation date in Unix Timestamp UTC format.

This documentation should assist you in effectively handling the real-time callback data from your invoices and payment transactions.

Last updated