Skip to content

One Touch No Reg API

Before you continue:

  1. You must have contacted our Commercial Department
  2. 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

noreg payment diagram

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
{
  "AMOUNT":"10",
  "APPID":"2143960160650364377823089976443473298565779337965372776022890068",
  "DESCRIPTION":"some descr",
  "DEVICEID":"1231234",
  "ID":"124345678",
  "RCPT":"8897458022",
  "RCPT_TYPE":"KIN",
  "REASON":"reason",
  "SAVECARD":1
}

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
my $amount = '10';
my $appid = '2143960160650364377823089976443473298565779337965372776022890068';
my $descr = 'some descr';
my $deviceid = '1231234';
my $id = '124345678';
my $rcpt = '8897458022';
my $rcpt_type = 'KIN';
my $reason = 'reason';
my $savecard = '1';
my $secret = '012345678909876543210';

my $data = <<DATA;
AMOUNT$amount
APPID$appid
DESCRIPTION$descr
DEVICEID$deviceid
ID$id
RCPT$rcpt
RCPT_TYPE$rcpt_type
REASON$reason
SAVECARD$savecard
DATA
my

my $CHECKSUM = hmac_hex($data, $secret, \&sha1);

#Checksum: 98a395b01ec69d049528d8971b8546aaa4adac16

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.

demo-system

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
{
    "payment": {
        "REASON":"reason for transfer",
        "DESCRIPTION":"transfer description",
        "AMOUNT":10,
        "TAX":100,
        "TOTAL":110,
        "RCPT_TYPE":"KIN",
        "RCPT":"8897458022",
        "PAYER_KIN":"5112074184",
        "STATE":3,
        "STATE.TEXT":"Payment made",
        "TOKEN": "99823906809141864859059099131376",
        "NO":"2000000000032229",
    },
    "payment_instrument": {
        "ID": "UsYGw8-pTlZU4DJOAYT911cDTSmYoCcPYIAaLZp-1FQ",
        "CARD_REF": "c8fb30bdaed9d9721b4ac215251333900548cca18575ae1f017566c12f8ee626",
        "NAME": "Visa***1111",
        "CARD_TYPE": "4",
        "TYPE": 1,
        "CARD_TYPE_DESCR": "Visa",
        "EXPIRES": "04/2020",
        "VERIFIED": 0,
        "CARD_TYPE_COUNTRY": "BG"
    },
    "savecard": 1,
    "status":"OK"
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "payment":{
        "AMOUNT":10,
        "TAX":100,
        "TOTAL":110,
        "REASON":"reason for transfer",
        "DESCRIPTION":"transfer description",
        "RCPT":"8897458022",
        "RCPT_TYPE":"KIN",
        "PAYER_KIN":"5112074184",
        "STATE":3,
        "STATE.TEXT":"Payment made",
        "TOKEN": "99823906809141864859059099131376",
        "NO":"2000000000032229",
    },
    "paid_with": {
        "CARD_TYPE": "4",
        "TYPE": 1,
        "CARD_TYPE_DESCR": "Visa",
        "CARD_TYPE_COUNTRY": ""
    },
    "savecard": 0,
    "status":"OK"
}

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
{
    "payment": {
        "REASON": "reasondominos",
        "DESCRIPTION": "descrdominos",
        "AMOUNT": 140,
        "TAX": 0,
        "TOTAL": 140,
        "RCPT_TYPE": "KIN",
        "RCPT": "4303137865",
        "PAYER_KIN": "3099545641",
        "STATE": 4,
        "STATE.TEXT": "Payment failed (Temporarily unable to complete. Please try again later. (1))",
        "TOKEN": "00000000000000000480783218379645",
        "NO": "2000000000039033",
    },
    "paid_with": {
        "CARD_TYPE_DESCR": "Visa",
        "TYPE": 1,
        "CARD_TYPE": "4",
        "CARD_TYPE_COUNTRY": "BG"
    },
    "savecard": 0,
    "status": "OK"
}
1
2
3
4
{
    "status":"OK",
    "msg":"NOT PAID",
}

This status shows the current status of the request, the customer may not have paid the request yet.

1
2
3
4
{
    "status":"OK",
    "msg":"EXPIRED",
}

Returns when the request is not paid within 15 minutes

1
2
3
4
5
{
    "status": "ERR",
    "err": "NO_DATA",
    "errm": "Request failed. Please contact support"
}

Description of response parameters

Parameter Type Description
status string Status
msg string Error message
err string Error type
errm string Description of the error