Overview
Introduction
Request Headers
application/json
.application/json
.Response Headers
The API has three main URLs
{domain}/v5/g2g/create
- Creates an object in the PG system.{domain}/v5/g2g/read
- Retrieves information about an object.{domain}/v5/g2g/edit
- Updates information about an object.The object contains a set of attributes that define its properties, status, and transaction history. Interaction with the object is performed through the payment system's API, allowing various operations such as creation, retrieval, updating, and deletion of objects, as well as executing additional actions within the context of a specific object.
Generating the X-JWS-Signature
The JWS format must include the mandatory blocks header and signature and should be passed in the request header X-JWS-Signature.
Header Structure (all fields are required)
{
"uri": "/v5/g2g/create",
"auth_id": "123456",
"method": "POST",
"params": "",
"alg": "HS256"
}
Header Structure (all fields are required)
Field | Description |
---|---|
uri | The path to the API endpoint being called |
auth_id | User ID for signature verification |
method | Request method |
params | Reserved field |
alg | Encryption algorithm |
Payload Structure
The supported signature encryption algorithm is HS256, and the merchant's secret_key should be used as the signing key.
Example of Signature Generation:
Header
{
"uri": "/v5/g2g/create",
"auth_id": "123456",
"method": "POST",
"params": "",
"alg": "HS256"
}
{
"amount": 123.42,
"currency": "KZT",
"description": "description",
"order_id": "order_id",
"user_id": "user_id",
"auto_clearing": true,
"from": {
"type": "card",
"card": {
"name": "CARD HOLDER",
"pan": "1234567890123456",
"cvc": "012",
"year": 24,
"month": 1
},
"save": true,
"recurrent": {
"lifetime": 3
}
},
"device": {
"user_ip": "123.123.123.123"
},
"urls": {
"check_url": "https://webhook.site/2af177da-0d72-4651-a31e-a0ea56ccc8a4",
"result_url": "https://webhook.site/2af177da-0d72-4651-a31e-a0ea56ccc8a4"
}
}
123456
Generated JWS:
eyJ1cmkiOiIvdjUvZzJnL2NyZWF0ZSIsImF1dGhfaWQiOiIxMjM0NTYiLCJtZXRob2QiOiJQT1NUIiwicGFyYW1zIjoiIiwiYWxnIjoiSFMyNTYifQ..82NnkgrNjfYu2UnAajnVsJUn2AgJWsqnmCK4x5A7zt0
Modified at 2025-02-17 19:15:43