ERIP tree API integration
Content
- Requirements for API requests
- Get ERIP tree
- Send required_attributes parameters, received in the response from a final node
- Register a payment, if a merchant has saved the client's final node and personal account ID
- Get a card token
- Void transaction
- Payment authorization and debiting funds from the client
Requirements for API requests
All requests should:
- Use HTTP Basic authentication with Shop ID и shop secret key, has headers
Content-Type: application/json
andAccept: application/json
- Use SSL connection with 128-bit (or more complex) encryption
- Use UTF-8 encoding.
Get ERIP tree
Request parameters
To get a ERIP tree, send a POST
to https://api.bepaid.by/beyag/gateways/komplat/get_pay_list
.
List of the ERIP nodes will be received in the response. To open ERIP node, it is required to send a new request with pay_code
of the node, which should be entered.
If a node in the request is final, the parameters that the client should fill out for the payment registration completion will be returned in the response.
Parameter | Type | Description |
---|---|---|
terminal_id * required |
string | Terminal ID. Unique for each merchant. |
pay_code * required |
string | ERIP node code. Starting node code: 11000000000 |
di_type * required |
string | ERIP node type code. Starting node type code: 9191 |
test | boolean | Set to true for a test request. Otherwise, false . |
Request example
{
"terminal_id": "10000002",
"pay_code": "11000000000",
"di_type": "9191"
}
Response parameters, if a node in the request is not final
Parameter | Type | Description |
---|---|---|
code | string | ERIP node type code |
name | string | Node name. |
di_type | string | ERIP node type code. |
Response example, if a node in the request is not final
[
{
"code":"11000304194",
"name":"Банковские, финансовые услуги",
"di_type":"9120"
},
{
"code":"11000300001",
"name":"БЕЛТЕЛЕКОМ",
"di_type":"9120"
},
{
"code":"11000300002",
"name":"Домофонные системы, Видеонаблюдение",
"di_type":"9120"
},
{
"code":"11000300088",
"name":"Интернет, Телевидение, Телефония",
"di_type":"9120"
},
{
"code":"11000300004",
"name":"Интернет-магазины/сервисы",
"di_type":"9120"
},
{
"code":"11000300005",
"name":"Коммунальные платежи",
"di_type":"9120"
},
{
"code":"11000300006",
"name":"Мобильная связь",
"di_type":"9120"
},
{
"code":"11000304212",
"name":"Налоги",
"di_type":"9120"
},
{
"code":"11000304351",
"name":"Стоянки, гаражи, парковки",
"di_type":"9120"
},
{
"code":"11000304168",
"name":"Суды, Юстиция, Юридические услуги",
"di_type":"9120"
}
]
Response parameters, if a node in the request is final
Parameter | Type | Description |
---|---|---|
code | string | Final ERIP node code. Corresponds to the pay_code parameter from the request. |
name | string | ERIP node name. |
di_type | string | ERIP node type code. |
information | string | ERIP message for displaying to the client. |
customer_name | object | Section with parameters of client's name, returned by ERIP service. If ERIP does not return the client's name, the null is returned |
first_name | string | Client's first name. |
middle_name | string | Client's middle name. |
last_name | string | Client's last name. |
required_attributes | array | Array with ERIP parameters that should be filled out by the client and transferred to ERIP |
information_attributes | array | Array with ERIP parameters for displaying to the client. |
erip_session_id | string | ERIP session ID |
Response example, if a node in the request is final
{
"code": "10002642301",
"name": "оплата по номеру телефона",
"di_type": "9191",
"information": "Введите 9 цифр тестового номера телефона",
"customer_name": {
"first_name": null,
"middle_name": null,
"last_name": null
},
"required_attributes": [
{
"code": "1001",
"name": "тестовый номер телефона",
"min_length": "9",
"max_length": "9"
}
],
"information_attributes": [],
"erip_session_id": "00000000000121603908-01-FBBD95"
}
Send required_attributes parameters, received in the response from a final node
Request parameters
Send a POST
request to https://api.bepaid.by/beyag/gateways/komplat/get_pay_list
with the following parameters:
Parameter | Type | Description |
---|---|---|
terminal_id * required |
string | Terminal ID. Unique for each merchant. |
pay_code * required |
string | ERIP final node code. |
di_type * required |
string | ERIP final node type code. |
erip_session_id | string | ERIP session ID |
attributes | object | Section with parameters filled out by the client from required_attributes array, received in the response from a final node. |
test | boolean | Set to true for a test request. Otherwise, false . |
Request example
{
"terminal_id": "10000002",
"pay_code": "10004372291",
"di_type": "9191",
"erip_session_id": "00000000005698332392-01-A7512E",
"attributes": {
"1001": "0291234567"
}
}
Response parameters
Parameter | Type | Description |
---|---|---|
code | string | Final ERIP node code. Corresponds to the pay_code parameter from the request. |
name | string | ERIP node name. |
di_type | string | ERIP node type code. |
billed_amount | string | Billed amount. If parameter fixed_amount=true , change amount is impossible. If fixed_amount=false , the interface should allow the client to change the amount. |
fixed_amount | boolean | true or false . If true , change billed_amount is impossible. |
currency | string | Currency in ISO-4217 format, for example BYN |
information | string | Information on personal account from ERIP for displaying to the client. |
information_attributes | array | Array with information parameters from ERIP for displaying to the client. |
customer_name | object | Section with parameters of client's name. If the client's name is not saved - null is returned |
first_name | string | Client's first name. |
middle_name | string | Client's middle name. |
last_name | string | Client's last name. |
erip_fine | string | Amount of ERIP fine. |
erip_commision | string | Amount of ERIP commission. |
erip_session_id | string | ERIP session ID |
Response example
{
"code": "10004372291",
"name": "Коммунальные платежи",
"di_type": "9191",
"billed_amount": "122.43",
"fixed_amount": true,
"currency": "BYN",
"information": null,
"information_attributes": [
{
"name": "Дата выставления",
"value": "12.03.2021"
},
{
"name": "Период",
"value": "02.2021"
},
{
"name": "Начислено",
"value": null
},
{
"name": "Начислено",
"value": "122,11 BYN"
},
{
"name": "Долг по пене",
"value": "0,32 BYN"
}
],
"customer_name": {
"first_name": null,
"middle_name": null,
"last_name": null
},
"erip_fine": "0.00",
"erip_commision": "0.00",
"erip_session_id": "00000000005698332392-00-0F0D24"
}
Register a payment, if a merchant has saved the client's final node and personal account ID
The method is used to implement saving the ERIP payment template. Thus, the client does not have to open ERIP tree. The parameters for the request should be stored in the Merchant's database.
Request parameters
Send a POST
to https://api.bepaid.by/beyag/gateways/komplat/get_pay_list
with the following parameters:
Parameter | Type | Description |
---|---|---|
terminal_id * required |
string | Terminal ID. Unique for each merchant. |
pay_code * required |
string | ERIP final node code. |
di_type * required |
string | ERIP final node type code |
erip_session_id | string | ERIP session ID |
customer | object | A section of the customer's account IDs. |
personal_account | string | ERIP personal account ID. |
erip_account | string | ERIP account ID. |
test | boolean | Set to true for a test request. Otherwise, false . |
Request example
{
"terminal_id": "10000002",
"pay_code": "10004345361",
"di_type": "9191",
"customer": {
"personal_account": "28923485423"
}
}
Response parameters
Response parameters are similar to described in the chapter Sending required_attributes parameters, received in the response from a final node.
Response example
{
"code": "10004345361",
"name": "Абонентская плата",
"di_type": "9191",
"billed_amount": "0.00",
"fixed_amount": false,
"currency": "BYN",
"information": "Введите лицевой счет Иван Иванович Иванов г. Минск, ул. Селицкого, д. 1, кв. 11, 1 под., 1 эт.-",
"information_attributes": [
{
"name": "Лицевой счет",
"value": "112233"
},
{
"name": "Период",
"value": "0221"
}
],
"customer_name": {
"first_name": null,
"middle_name": null,
"last_name": null
},
"erip_fine": "0.00",
"erip_commision": "0.00",
"erip_session_id": "00000000005656285468-00-664734"
}
Get a card token
The card token can be obtained beforehand, for example, when registering a client in the application. Then, make ERIP payments with the received token.
The request to getting a card token is similar to described in the chapter Authorization.
Void transaction
The request is used after successful authorization to cancel the blocking of funds after authorization.
The void transaction is similar to described in the chapter Void.
Payment authorization and debiting funds from the client
The request is similar to described in the chapter Authorization.
After successful authorization, debiting funds from a client will be made automatically.
Description of ERIP parameters is published in the section request.additional_data.komplat
in the chapter Authorization.
Request example
{
"request": {
"amount": 100,
"currency": "BYN",
"description": "Test transaction",
"tracking_id": "my_tracking_id",
"credit_card": {
"token": "144da09d-078e-4aca-8919-032c87763b55"
},
"additional_data": {
"komplat": {
"pay_code": "10000156731",
"di_type": "9191",
"erip_session_id": "00000000000117153888-00-46F3AE"
}
}
}
}