Payment
Payment transaction is a combination of authorization and capture processed at a time. This transaction type is generally used when the goods or services can be immediately provided to the customer.
Info
It is required to be PCI DSS validated to use this transaction and send plain unencrypted card data.
Request
Info
To link a card, you need to use a payment transaction with zero amount ("amount": 0). During the transaction, 30 KZT will be temporarily charged from the customer's card and then automatically refunded. The request must include the contract array for card tokenization ("contract": ["card_on_file", "recurring"]). The response will contain a card token which can be used for the subsequent charges.
To initiate a payment transaction, send a POST request to https://gateway.fortebank.com/transactions/payments 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",
"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"
},
"additional_data": {
"referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247¤cy=USD"
}
}
}
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":"429f355a-a45a-4578-a0f6-b61885cfe47d"
},
"customer":{
"ip":"127.0.0.1",
"email":"john@example.com"
}
}
}
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"
}
}
}
Example of the request with information about ticket and tour voucher sale
{
"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":"429f355a-a45a-4578-a0f6-b61885cfe47d"
},
"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_ticket_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"
}
]
}
}
}
}
Response
In the transaction section response parameters replicate request parameters except the additional ones:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
Example of the response
{
"transaction": {
"uid": "12803315-c061-4f8d-8f42-4abaf3f8319d",
"status": "successful",
"amount": 492,
"currency": "EUR",
"description": "Test transaction",
"type": "payment",
"payment_method_type": "credit_card",
"tracking_id": "your_uniq_number",
"message": "Successfully processed",
"test": true,
"created_at": "2024-04-02T12:47:26.818Z",
"updated_at": "2024-04-02T12:47:30.960Z",
"paid_at": "2024-04-02T12:47:30.909Z",
"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": "10f43f34-5a34-430a-afd7-affe77ed5c90"
},
"receipt_url": "https://backoffice.fortebank.com/customer/transactions/12803315-c061-4f8d-8f42-4abaf3f8319d/6392098201d357893deef7eb11270e863da7004ebfcd27bdb3235280e90ebf99?language=en",
"status_code": null,
"gateway": {
"iframe": true
},
"mute_notifications": null,
"id": "12803315-c061-4f8d-8f42-4abaf3f8319d",
"additional_data": {
"contract": [
"recurring"
],
"referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247¤cy=USD"
},
"redirect_url": "https://gateway.fortebank.com/process/12803315-c061-4f8d-8f42-4abaf3f8319d",
"code": "S.0000",
"friendly_message": "The operation is successful.",
"smart_routing_verification": {
"status": "successful"
},
"payment": {
"auth_code": "654321",
"bank_code": "05",
"rrn": "999",
"ref_id": "777888",
"message": "Payment was approved",
"amount": 492,
"currency": "EUR",
"billing_descriptor": "test descriptor",
"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
}
}
}
Example of the response with incomplete 3-D Secure verification
{
"transaction": {
"uid": "c37c2df6-707e-4e49-bc0f-1c0a1800a238",
"status": "incomplete",
"amount": 492,
"currency": "EUR",
"description": "Test transaction",
"type": "payment",
"payment_method_type": "credit_card",
"tracking_id": "your_uniq_number",
"message": null,
"test": true,
"created_at": "2024-04-02T13:44:22.590Z",
"updated_at": "2024-04-02T13:44:24.802Z",
"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": "34577a72-ed65-4b0c-85a1-f62262f54af6"
},
"receipt_url": "https://backoffice.fortebank.com/customer/transactions/c37c2df6-707e-4e49-bc0f-1c0a1800a238/571fddcc764f75f0daad3acb746d46a80c4112e51d43eda8538aa1b27597120e?language=en",
"status_code": null,
"gateway": {
"iframe": true
},
"mute_notifications": null,
"id": "c37c2df6-707e-4e49-bc0f-1c0a1800a238",
"additional_data": {
"contract": [
"recurring"
]
},
"redirect_url": "https://gateway.fortebank.com/process/c37c2df6-707e-4e49-bc0f-1c0a1800a238",
"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://gateway.fortebank.com/process/c37c2df6-707e-4e49-bc0f-1c0a1800a238",
"eci": null,
"pa_status": null,
"xid": null,
"cavv": null,
"cavv_algorithm": null,
"fail_reason": null,
"method_process_url": null,
"creq": null
},
"payment": {
"auth_code": null,
"bank_code": null,
"rrn": null,
"ref_id": null,
"message": null,
"amount": 492,
"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
}
}
}