Payment Confirmation
Method: POST.
URL: https://api.tamayyuz-tijari.com/api/gateway/status/details/
Request Headers
-
X-Authorization: API_KEY -
Accept: application/json
Request Parameters
| Name | Description | Validation |
|---|---|---|
| invoice_id | Order number of the web merchant | Required |
| language | Language of the request | Required; String; Options: ar, fr, en. Default: fr |
Responses
-
Successful Request
-
200: Payment request submitted successfuly
Response in
jsonformatName Description Validation invoice_id Order number of the web merchant Required; String satim_order_id SATIM order ID Required; String tamayyuz_epay_id TAMAYYUZ ePay order ID Required; String epay_amount Order total amount Required; Decimal (0.01) date Date and time of payment, in Algiers/Algeria timezone Required; DateTime refunded If this transaction has been refunded partially or fully Required; Boolean refund_amount Amount refunded of the transaction Required; status Status of the transaction Required; String; Options: 'S' for Succeeded','F' for Failed, 'P' for Pending description Last update of the transaction Required; String cardholder_name Name of the CIB/EDAHABIA card holder Optional; String satim_description SATIM description of the transaction Required; String approval_code SATIM approval code Required; String return_url URL to redirect to after payment success Required; String fail_url URL to redirect to after payment failure Required; String Example
{
"invoice_id": 99,
"satim_order_id": "UmXcQHI7aAYGUQAAFQTH",
"tamayyuz_epay_id": 1298,
"epay_amount": "2500.59",
"date": "2023-10-01T12:34:56Z",
"refunded": false,
"refund_amount": null,
"status": "S",
"description": "Transaction succeeded",
"cardholder_name": "",
"satim_description": "Votre paiement a été accepté",
"approval_code": 123456,
"return_url": "https://your-website.com/return",
"fail_url": "https://your-website.com/fail",
}
-
-
Failed Request
Response in
jsonformat.Example:
{"detail": "Error detail"}-
400: BAD REQUEST
Missing or invalid parameters or Unknown order id. Error details in
detail. -
403: FORBIDDEN
Missing or invalid API_KEY. Error details in
detail. -
500: INTERNAL SERVER ERROR
Gateway failed to retrieve transaction details. Error details in
detail. -
XXX: request throttled
You made more than request per minute. Error details in
detail.
-
warning
It is possible to request status of your transaction with a max of 5 times/min
Code Examples
- Python
- JavaScript/TypeScript
- PHP
import requests
GATEWAY_URL = 'https://your-gateway-url.com/status/details/'
API_KEY = 'your_api_key_here'
invoice_id = '12345'
language = 'FR' # Optional
headers = {
'X-Authorization': API_KEY
}
params = {
'invoice_id': invoice_id,
'language': language
}
response = requests.get(GATEWAY_URL, headers=headers, params=params)
print(response.json())
const GATEWAY_URL = 'https://your-gateway-url.com/status/details/';
const API_KEY = 'your_api_key_here';
const invoiceId = '12345';
const language = 'FR';
fetch(`${GATEWAY_URL}?invoice_id=${invoiceId}&language=${language}`, {
method: 'GET',
headers: {
'X-Authorization': API_KEY
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$gatewayUrl = 'https://your-gateway-url.com/status/details/';
$apiKey = 'your_api_key_here';
$invoiceId = '12345';
$language = 'FR';
$headers = [
'X-Authorization: ' . $apiKey
];
$url = $gatewayUrl . '?invoice_id=' . urlencode($invoiceId) . '&language=' . urlencode($language);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>