Tokenization
The request is used to get a bank card token along with the 3-D Secure verification details and then to use the token to submit either a payment or an authorization transaction.
As a result of a tokenization transaction, money isn't withdrawn from the card account. Use the received token to send a payment or authorization request.
Request
To get a card tokenized, send a POST request to https://gateway.fortebank.com/transactions/tokenizations with the following parameters:
Note
The request body must be wrapped in a top-level request{} object.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example of the request
{
"request":{
"amount":100,
"currency":"USD",
"description":"Test transaction",
"tracking_id":"your_uniq_number",
"language":"en",
"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"
},
"additional_data": {
"referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247¤cy=USD"
}
}
}
Response
In the transaction section response parameters replicate request parameters except the additional ones:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example of the response
{
"transaction": {
"uid": "e89abc1a-1d18-4d0f-83a1-7009b333dce0",
"status": "successful",
"amount": 492,
"currency": "EUR",
"description": "Test transaction",
"type": "tokenization",
"payment_method_type": "credit_card",
"tracking_id": "your_uniq_number",
"message": "Successfully processed",
"test": true,
"created_at": "2024-04-02T14:32:33.946Z",
"updated_at": "2024-04-02T14:32:35.000Z",
"paid_at": null,
"language": "en",
"redirect_url": "https://gateway.fortebank.com/process/e89abc1a-1d18-4d0f-83a1-7009b333dce0",
"status_code": null,
"id": "e89abc1a-1d18-4d0f-83a1-7009b333dce0",
"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": "e3ba5977-8705-4496-bf90-a6a93d3d31cc"
},
"additional_data": {
"contract": [
"recurring"
],
"referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247¤cy=USD"
},
"smart_routing_verification": {
"status": "successful"
},
"tokenization": {
"message": null,
"gateway_id": 3483,
"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
}
}
}