API for developers
H2H action
Action
Endpoint: /api/h2h/action
Current settings:
| Field | Field description |
|---|---|
| payment_id | tracking number of the payment order in the client's accounting system |
| session | h2h session identifier obtained during payment design |
| action | the action identifier, obtained in the previous step in the field data.action |
| h2h_data |
An array filled with the data requested in the previous step. Data is transferred as an array: {field_name} => {field_value} |
Example request: { "session": "1234", "payment_id": "123434567", "action": "otp", "h2h_data": { "otp": "123456" }
Example of successful implementation: { "session": "0799c091-3e2f-4f41-91fd-c410e9b0978f", "payment_id": "8d33a677-74aa-4d17-9efc-e35a4bd3cb8c", "result": true, "final": false, "data": { ...... } }
List of returned fields:
| Field | Field description |
|---|---|
| error | error description |
| errors |
array with errors in the filled data. The field is filled in as follows: {field_name} => {error_text}. field_name - identifier of the field in which the error occurred error_text - error description |
| session | ID of the session within which the request is executed |
| result | the result of the request execution (whether the execution was successful or not) |
| next_step | next step identifier (/api/h2h/{step identifier}) where the completed data received in the field should be sent data |
| final | Is the session in its final stages or not? |
| data |
An array containing data required for subsequent processing of the operation. The list depends on the currency in which the invoice was issued. |