One Touch No Reg API
Before you continue:
- You must have contacted our Commercial Department
- You must have received
APPID
&SECRET
Payment by an unregistered user¶
Upon payment by a user without registration, a token is generated, the validity of which is determined by the option to save the card for future payments savecard = 0|1
.
With savecard = 0
, the token is only valid for the current payment
With savecard = 1
the token is valid for all future payments
Generate checksum¶
Payment requests from a non-registered user require a Hexadecimal HMAC SHA-1 CHECKSUM
Parameter | Description |
---|---|
request_data | The parameters and their values in the request, sorted in ascending order by parameter name, concatenated with \n (newline) |
SECRET | A unique key that you receive from ePay.bg when registering an application |
Sample query parameters
1 2 3 4 5 6 7 8 9 10 11 |
|
Example of request_data
request_data="AMOUNT10\nAPPID2143960160650364377823089976443473298565779337965372776022890068\nDESCRIPTIONsome descr\nDEVICEID1231234\nID124345678\nRCPT8897458022\nREASON\nREASON_TYPE"
Checksum generation example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Encoding result
Encoding request_data
with parameter SECRET="012345678909876543210"
Result:
CHECKSUM = "98a395b01ec69d049528d8971b8546aaa4adac16"
GET /api/payment/noreg/send¶
Method | System |
---|---|
POST | API_BASE_WEB |
The user enters card details and chooses whether to keep it for future payments.
This generates a TOKEN
user ID after which the user can make a payment.
Token validity for unsaved card
With savecard = 0
, the token is only valid for the current payment.
Query parameters
Parameter | Type | Description | Optionality |
---|---|---|---|
AMOUNT | int | Payment amount in stotinki | Mandatory |
APPID | string | Application ID | Mandatory |
DESCRIPTION | string | Transfer Description | Mandatory |
DEVICEID | string | Device ID | Mandatory |
ID | string | Unique key by which to subsequently search for the query result | Mandatory |
RCPT | string | Recipient's CIN | Mandatory |
RCPT_TYPE | string | It is always KIN |
Mandatory |
REASON | string | Described reason for transfer | Mandatory |
CHECKSUM | string | Hexadecimal HMAC SHA-1 is a checksum verifying that the request came from you | Mandatory |
SAVECARD | int 0|1 |
Option to save the card for future payments SAVECARD = 1 |
Optional |
Sample request
API_BASE_WEB/api/payment/noreg/send?APPID=2143960160650364377823089976443473298565779337965372776022890068&DEVICEID=1231234&ID=124345678&AMOUNT=10&RCPT=8897458022&RCPT_TYPE=KIN&DESCRIPTION=some descr&REASON=reason&checksum=93bb9753b17205f94b184bc5a94f55b3d1d2afca
API_BASE_WEB/api/payment/noreg/send?APPID=2143960160650364377823089976443473298565779337965372776022890068&DEVICEID=1231234&ID=124345678&AMOUNT=10&RCPT=8897458022&RCPT_TYPE=KIN&DESCRIPTION=some descr&REASON=reason&SAVECARD=1&checksum=98a395b01ec69d049528d8971b8546aaa4adac16
After entering card details, the customer is redirected to REPLY_ADDRESS
.
GET /api/payment/noreg/send/status¶
Method | System |
---|---|
GET | API_BASE |
Verification of payment by an unregistered user
Parameter | Type | Description | Optionality |
---|---|---|---|
APPID | string | Unique application identifier | Mandatory |
DEVICEID | string | Unique device identifier | Mandatory |
ID | string | Unique key by which to subsequently search for the query result | Mandatory |
RCPT_TYPE | string | It is always KIN |
Mandatory |
RCPT | string | Recipient's CIN | Mandatory |
Sample request
https://demo.epay.bg/xdev/api/api/payment/noreg/send/status?AMOUNT=666&APPID=6609898197243081281733444125044765054179316360618564706359682755&CHECKSUM=24f946e2d30ea5c184c788539cf8f06fe996cc18&DESCRIPTION=test&DEVICEID=TestTestov123&ID=TestTestov123&RCPT=2945322142&RCPT_TYPE=KIN&REASON=test
Response on successful payment¶
With savecard=1
, a TOKEN
is returned which can be used for future payments. The ID
of the payment instrument is also returned, which must be submitted in the PINS
parameter for subsequent payments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Description of response parameters
payment
Parameter | Type | Description |
---|---|---|
AMOUNT | int | Payment amount in stotinki |
TAX | int | Payment fee in stotinki |
TOTAL | int | AMOUNT + TAX in stotinki |
REASON | string | Additional payment description |
DESCRIPTION | string | Payment description |
RCPT | string | Recipient's CIN |
RCPT_TYPE | string | It's always KIN |
PAYER_KIN | string | CIN of the payer |
STATE | int | Payment result 2|3|4 2 - Processing 3 - Payment successful 4 - Payment failed |
STATE.TEXT | string | An error that can be displayed to the user |
TOKEN | string | A unique user ID |
NO | string | Payment system code |
payment_instrument
Contains savecard=1
when the user has saved the payment instrument during checkout.
Parameter | Type | Description |
---|---|---|
ID | int | Card key |
NAME | string | Card name |
CARD_TYPE | string | The first digit of the card number |
CARD_TYPE_DESCR | string | Payment instrument information |
TYPE | int 0|1 |
TYPE = 1 (bank card) |
EXPIRES | string MM/YYYY |
Card validity date |
VERIFIED | int 0|1 |
Is the card confirmed 0 - no 1 - yes |
CARD_TYPE_COUNTRY | string | Card issuing country |
paid_with
Contains savecard=0
when the user has NOT saved the payment instrument during checkout.
Parameter | Type | Description |
---|---|---|
CARD_TYPE_COUNTRY | string | Card issuing country |
CARD_TYPE_DESCR | string | Information about the payment instrument |
CARD_TYPE | string | The first digit of the card number if it is a bank card |
TYPE | int 0|1 |
TYPE = 1 (bank card) |
Response to failed payment¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
1 2 3 4 |
|
This status shows the current status of the request, the customer may not have paid the request yet.
1 2 3 4 |
|
Returns when the request is not paid within 15 minutes
1 2 3 4 5 |
|
Description of response parameters
Parameter | Type | Description |
---|---|---|
status | string | Status |
msg | string | Error message |
err | string | Error type |
errm | string | Description of the error |