Authorization
The authorization request is used either to check if there are enough funds available on the card to make a payment, or to hold the required amount for a future charge. The funds are not deducted from the cardholder's account but the available funds limit is shown as decreased by the authorization amount.
The authorization transaction should be followed by a capture request to charge the amount, or by a void request to cancel the hold.
Info
It is required to be PCI DSS validated to use this transaction type and send plain unencrypted card data.
Request
To initiate an authorization transaction, send a POST
request to https://gateway.bepaid.by/transactions/authorizations
with the following parameters:
Note
The request body must be wrapped in a top-level request{} object.
|
Example of the authorization request
{
"request":{
"amount":100,
"currency":"USD",
"description":"Test transaction",
"tracking_id":"your_uniq_number",
"language":"en",
"test":true,
"billing_address":{
"first_name":"John",
"last_name":"Doe",
"country":"US",
"city":"Denver",
"state":"CO",
"zip":"96002",
"address":"1st Street"
},
"credit_card":{
"number":"4200000000000000",
"verification_value":"123",
"holder":"John Doe",
"exp_month":"05",
"exp_year":"2027"
},
"customer":{
"ip":"127.0.0.1",
"email":"john@example.com"
}
}
}
Example of the request with card token
{
"request":{
"amount":100,
"currency":"USD",
"description":"Test transaction",
"tracking_id":"your_uniq_number",
"test":true,
"billing_address":{
"first_name":"John",
"last_name":"Doe",
"country":"US",
"city":"Denver",
"state":"CO",
"zip":"96002",
"address":"1st Street"
},
"credit_card":{
"token":"40bd001563085fc35165329ea1ff5c5ecbdbbeef40bd001563085fc35165329e"
},
"customer":{
"ip":"127.0.0.1",
"email":"john@example.com"
}
}
}
Example of the request with information about ticket and tour voucher sales
{
"request":{
"amount":100,
"currency":"USD",
"description":"Test transaction",
"tracking_id":"your_uniq_number",
"test":true,
"billing_address":{
"first_name":"John",
"last_name":"Doe",
"country":"US",
"city":"Denver",
"state":"CO",
"zip":"96002",
"address":"1st Street"
},
"credit_card":{
"token":"40bd001563085fc35165329ea1ff5c5ecbdbbeef40bd001563085fc35165329e"
},
"customer":{
"ip":"127.0.0.1",
"email":"john@example.com"
},
"travel": {
"airline": {
"agency_code": "03",
"agency_name": "Corel travel",
"ticket_number": "390 5241 025377 1",
"booking_number": "DKZVUA",
"restricted_ticked_indicator": "0",
"legs": [
{
"airline_code": "B2",
"stop_over_code": "X",
"flight_number": "A3 971",
"departure_date_time": "2014-05-26T05:15:00",
"arrival_date_time": "2014-05-26T07:30:00",
"originating_country": "RU",
"originating_city": "Moscow",
"originating_airport_code": "DME",
"destination_country": "Greece",
"destination_city": "Athens",
"destination_airport_code": "ATH",
"coupon": "coupon code",
"class": "C"
}
],
"passengers":[
{
"first_name": "KONSTANTIN",
"last_name": "IVANOV"
},
{
"first_name": "JULIA",
"last_name": "IVANOVA"
}
]
}
}
}
}
Example of the request with additional receipt text
{
"request":{
"amount":100,
"currency":"USD",
"description":"Test transaction",
"tracking_id":"your_uniq_number",
"language":"en",
"test":true,
"billing_address":{
"first_name":"John",
"last_name":"Doe",
"country":"US",
"city":"Denver",
"state":"CO",
"zip":"96002",
"address":"1st Street"
},
"credit_card":{
"number":"4200000000000000",
"verification_value":"123",
"holder":"John Doe",
"exp_month":"05",
"exp_year":"2027"
},
"additional_data":{
"receipt_text": ["First line", "Second Line"]
},
"customer":{
"ip":"127.0.0.1",
"email":"john@example.com"
}
}
}
Response
In the transaction section response parameters replicate request parameters except the additional ones:
|
|
Example of the response
{
"transaction": {
"uid": "bf2ebe5b-0a31-4769-b61d-a46afa3b98fa",
"status": "successful",
"amount": 482,
"currency": "EUR",
"description": "Test transaction",
"type": "authorization",
"payment_method_type": "credit_card",
"tracking_id": "your_uniq_number",
"message": "Successfully processed",
"test": true,
"created_at": "2024-04-02T08:40:33.377Z",
"updated_at": "2024-04-02T08:40:38.455Z",
"paid_at": "2024-04-02T08:40:38.400Z",
"expired_at": null,
"recurring_type": "initial",
"closed_at": null,
"settled_at": null,
"manually_corrected_at": null,
"language": "en",
"credit_card": {
"holder": "John Doe",
"stamp": "bb58cad9c1204ca2287b3e1006cc1a2c0fb8f062dde9e5232c8be5498bd0e62a",
"brand": "visa",
"last_4": "1097",
"first_1": "4",
"bin": "401200",
"bin_8": "40120000",
"issuer_country": null,
"issuer_name": null,
"product": null,
"exp_month": 7,
"exp_year": 2027,
"token_provider": null,
"token": "854d95e6-b7a5-41fb-b2a0-b8a6a0ae2021"
},
"receipt_url": "https://merchant.bepaid.by/customer/transactions/bf2ebe5b-0a31-4769-b61d-a46afa3b98fa/e6d23017fb43c6e2be34992efef50cfbadd3bb64942d7a9fe74a3e726a3907a6?language=en",
"status_code": null,
"gateway": {
"iframe": false
},
"mute_notifications": null,
"id": "bf2ebe5b-0a31-4769-b61d-a46afa3b98fa",
"additional_data": {
"contract": [
"recurring"
]
},
"redirect_url": "https://gateway.bepaid.by/process/bf2ebe5b-0a31-4769-b61d-a46afa3b98fa",
"code": "S.0000",
"friendly_message": "The operation is successful.",
"smart_routing_verification": {
"status": "successful"
},
"authorization": {
"auth_code": "654321",
"bank_code": "05",
"rrn": "999",
"ref_id": "777888",
"message": "Authorization was approved",
"amount": 482,
"currency": "EUR",
"billing_descriptor": "test descriptor",
"gateway_id": 3208,
"status": "successful"
},
"customer": {
"ip": null,
"email": null,
"device_id": null,
"birth_date": null
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"address": "1st Street",
"country": "US",
"city": "Denver",
"zip": "96002",
"state": "CO",
"phone": null
}
}
}
Example of the response on incomplete 3-D Secure transaction
{
"transaction": {
"uid": "1f63b7ec-c58f-4a38-87bc-e8ea55a7d9c5",
"status": "incomplete",
"amount": 482,
"currency": "EUR",
"description": "Test transaction",
"type": "authorization",
"payment_method_type": "credit_card",
"tracking_id": "your_uniq_number",
"message": null,
"test": true,
"created_at": "2024-04-02T10:22:01.352Z",
"updated_at": "2024-04-02T10:22:03.058Z",
"paid_at": null,
"expired_at": null,
"recurring_type": "initial",
"closed_at": null,
"settled_at": null,
"manually_corrected_at": null,
"language": "en",
"credit_card": {
"holder": "John Doe",
"stamp": "bb58cad9c1204ca2287b3e1006cc1a2c0fb8f062dde9e5232c8be5498bd0e62a",
"brand": "visa",
"last_4": "1097",
"first_1": "4",
"bin": "401200",
"bin_8": "40120000",
"issuer_country": null,
"issuer_name": null,
"product": null,
"exp_month": 7,
"exp_year": 2027,
"token_provider": null,
"token": "5d1392f2-864d-499b-b3ce-40e68d980d71"
},
"receipt_url": "https://merchant.bepaid.by/customer/transactions/1f63b7ec-c58f-4a38-87bc-e8ea55a7d9c5/4bfe945ab88e76507becb0f792f14426ad261afe2f809932cdcfd6c713ad6339?language=en",
"status_code": null,
"gateway": {
"iframe": true
},
"mute_notifications": null,
"id": "1f63b7ec-c58f-4a38-87bc-e8ea55a7d9c5",
"additional_data": {
"contract": [
"recurring"
]
},
"redirect_url": "https://gateway.bepaid.by/process/1f63b7ec-c58f-4a38-87bc-e8ea55a7d9c5",
"code": "P.4012",
"friendly_message": "Redirect to pass 3-D Secure verification.",
"smart_routing_verification": {
"status": "successful"
},
"three_d_secure_verification": {
"status": "incomplete",
"message": "Authentication Available",
"ve_status": "Y",
"acs_url": null,
"pa_req": null,
"md": null,
"pa_res_url": "https://merchant.bepaid.by/process/1f63b7ec-c58f-4a38-87bc-e8ea55a7d9c5",
"eci": null,
"pa_status": null,
"xid": null,
"cavv": null,
"cavv_algorithm": null,
"fail_reason": null,
"method_process_url": null,
"creq": null
},
"authorization": {
"auth_code": null,
"bank_code": null,
"rrn": null,
"ref_id": null,
"message": null,
"amount": 482,
"currency": "EUR",
"billing_descriptor": null,
"gateway_id": 3483,
"status": "incomplete"
},
"customer": {
"ip": null,
"email": null,
"device_id": null,
"birth_date": null
},
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"address": "1st Street",
"country": "US",
"city": "Denver",
"zip": "96002",
"state": "CO",
"phone": null
}
}
}