The recipient's card tokenization
The request is used to get a token for the recipient's bank card along with 3-D Secure verification details and then to use the token to submit a payout transaction.
Request
To get the recipient's card tokenized, send a POST
request to https://demo-gateway.begateway.com/transactions/recipient_tokenizations
with the following parameters:
Parameter | Type | Description |
---|---|---|
description | string (255) | The short description. |
tracking_id | string | Your internal ID of the recipient's card tokenization transaction. |
recipient_billing_address | object | A section of the recipient's billing address. Contact Tech Support Team to inquire if your acquirer requires any of the section parameters. |
first_name * conditionally required |
string (30) | The recipient's first name. |
last_name * conditionally required |
string (30) | The recipient's last name. |
country * conditionally required |
string | The recipient's billing country in ISO 3166-1 Alpha-2 format. |
city * conditionally required |
string (60) | The recipient's billing city. |
state * conditionally required |
string | The recipient's two-letter billing state only if the billing address country is US or CA . |
zip | string | The recipient's billing ZIP or postal code. If country=US , zip format must be NNNNN or NNNNN-NNNN |
address * conditionally required |
string (255) | The recipient's billing address. |
phone * conditionally required |
string (100) | The recipient's phone number. |
recipient_credit_card | object | A section of the recipient's card details. Contact Tech Support Team to inquire if your acquirer requires any of the section parameters. |
number * required |
string (19) | Card number. |
holder * conditionally required |
string (32) | The cardholder name as it appears in the card. |
exp_month * conditionally required |
integer | The card expiration month expressed with two digits (for example, 01). |
exp_year * conditionally required |
integer | The card expiration year expressed with four digits (for example, 2007). |
recipient | object | A section of the recipient information. Contact Tech Support Team to inquire if your acquirer requires any of the section parameters. |
ip * conditionally required |
string | The customer's IP address. |
email * conditionally required |
string | The customer's email. |
device_id * conditionally required |
string | The customer's device ID (desktop, smartphone, etc.). |
birth_date * conditionally required |
string | The customer's birth date in ISO 8601 format YYYY-MM-DD . |
Example of the request
{
"request": {
"description": "Test transaction",
"tracking_id": "your_uniq_number",
"recipient_billing_address": {
"first_name": "John",
"last_name": "Doe",
"country": "US",
"city": "Denver",
"state": "CO",
"zip": "96002",
"address": "1st Street"
},
"recipient_credit_card": {
"number": "4200000000000000",
"holder": "John Doe",
"exp_month": "05",
"exp_year": "2020"
},
"recipient": {
"ip": "127.0.0.1",
"email": "john@example.com"
}
}
}
Response
In the transaction section response parameters replicate request parameters except for the additional ones:
Parameter | Type | Description |
---|---|---|
transaction | object | |
uid * required |
string | A UID of the processed transaction. |
status * required |
string | A status of the processed transaction. |
type * required |
string | A transaction type. |
payment_method_type * required |
string | A payment method used to complete the transaction. Possible values: credit_card . |
tracking_id * required |
string | The tracking_id parameter value sent in the transaction request. |
message * required |
string | A processing result message. |
created_at * required |
string | The transaction creation date. |
updated_at * required |
string | The transaction update date. For example, status update. |
recipient_credit_card | object | |
holder * required |
string | The recipient's name. |
stamp * required |
string | The card hash. It is constant even if expiration dates or card holder are changed. |
token * required |
string | The card token. Store the token and charge returning customers or run recurring charges without customers' billing details. The token allows you to save the customer's details and charge them whenever they make new purchases, or you renew their services. |
brand * required |
string | The detected card brand: visa , master , jcb , discover , dinersclub , amex , belkart and unionpay . |
last_4 * required |
string | The last 4 digits of the card. |
first_1 * required |
string | The first digit of the card. |
bin * required |
string | A BIN (Bank Identification Number). |
issuer_country * required |
string | A country of the bank that issued the card. |
issuer_name * required |
string | A name of the bank that issued the card. |
product * required |
string | A card product type code. |
exp_month * required |
integer | The card expiration month expressed with two digits (for example, 01). |
exp_year * required |
integer | The card expiration year expressed with four digits (for example, 2023). |
token_provider * required |
string | Not used in this transaction. Always null . |
id * required |
string | A UID of the processed transaction. |
Example of the response
{
"transaction": {
"uid": "1-310b0da80b",
"status": "successful",
"description": "Test transaction",
"type": "recipient_tokenization",
"payment_method_type": "credit_card",
"tracking_id": "tracking_id_000",
"message": "Successfully processed",
"created_at": "2021-04-13T15:37:06.119Z",
"updated_at": "2021-04-13T15:37:06.176Z",
"recipient": {
"ip": "127.0.0.1",
"email": "john@example.com",
"device_id": null,
"birth_date": null
},
"recipient_credit_card": {
"holder": "John Doe",
"stamp": "a825df7faba8804619aef7a6d5a5821ec292fce04e3e43933ca33d0692df90b4",
"token": "40bd001563085fc35165329ea1ff5c5ecbdbbeef40bd001563085fc35165329e",
"brand": "visa",
"last_4": "0000",
"first_1": "4",
"bin": "420000",
"issuer_country": null,
"issuer_name": null,
"product": null,
"exp_month": null,
"exp_year": null,
"token_provider": null
},
"recipient_billing_address": {
"first_name": "John",
"last_name": "Doe",
"address": "1st Street",
"country": "US",
"city": "Denver",
"zip": "96002",
"state": "CO",
"phone": null
},
"id": "1-310b0da80b"
}
}