Create IBAN withdrawal
Create a withdrawal using IBAN¶
Endpoint for withdrawal creation
Withdrawal operation
POST /api/ibancredit
This endpoint expects POST request in JSON format with parameters.
Request and response parameters¶
Request parameters
| Parameters | Type | Mandatory | Description |
|---|---|---|---|
version |
string(10) | optional | Protocol version. Default value: 1.0.1 Version 1.0 is deprecated |
order_id |
string(1024) | mandatory | Order ID which is generated by merchant |
merchant_id |
integer(12) | mandatory | Merchant unique ID. Generated by Flitt during merchant registration |
order_desc |
string(1024) | mandatory | Order description. Generated by merchant in UTF-8 always |
amount |
integer(12) | mandatory | Order amount without separator. 1020 (GEL) means 10 lari and 20 tetri |
currency |
string(3) | mandatory | Order currency. Only GEL is supported for IBAN withdrawal |
server_callback_url |
string(2048) | optional | Merchant site URL, where host-to-host callback will be sent after payment completion. See Callbacks for more details on callbacks. |
signature |
string(40) | mandatory | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response and response |
merchant_data |
string(2048) | optional | Any arbitrary set of data that a merchant wants to get back in the response to and server_callback_url, and also in reports |
product_id |
string(1024) | optional | Merchant product or service id |
receiver_iban |
string(40) | mandatory | IBAN number |
receiver_name |
string(200) | optional | Receiver name |
merchant_data |
string(2048) | optional | Any arbitrary set of data that a merchant wants to get back in the response to response_url or/and server_callback_url, and also in reports |
Request examples
{
"request": {
"order_id": "test_1234312142",
"merchant_id": "1549901",
"order_desc": "Test order",
"amount": 1000,
"currency": "GEL",
"receiver_iban": "GE00TB0000000000000001",
"server_callback_url": "https://myserver.com/callback",
"signature": "51e59ffd263d071da8e1a1fc10b981f459dbe6f1"
}
}
Response examples
{
"response": {
"product_id": "",
"masked_card": "",
"currency": "GEL",
"response_description": "",
"order_status": "approved",
"response_status": "success",
"order_time": "21.09.2024 01:22:02",
"order_id": "test_1234312142",
"tran_type": "p2p credit",
"payment_system": "iban",
"approval_code": "",
"merchant_id": 1549901,
"payment_id": 818990350,
"card_bin": null,
"response_code": "",
"card_type": "",
"amount": "1000",
"signature": "e7e8b3641dab8eee546e8183b9180e67f1568deb",
"additional_info": "{\"capture_status\": null, \"capture_amount\": null, \"reservation_data\": null, \"transaction_id\": 2019043606, \"bank_response_code\": null, \"bank_response_description\": null, \"client_fee\": 0.0, \"settlement_fee\": 0.0, \"bank_name\": null, \"bank_country\": null, \"card_type\": \"\", \"card_product\": \"\", \"card_category\": null, \"timeend\": \"21.09.2024 01:22:03\", \"ipaddress_v4\": \"178.54.60.26\", \"payment_method\": \"TBC\", \"payer_iban\": \"GE00TB0000000000000001\", \"is_test\": true}"
}
}
{
"response": {
"error_code": 1002,
"error_message": "Application error",
"request_id": "ghfIuTtVrbWYY",
"response_status": "failure"
}
}
SDK example¶
IBAN withdrawal is a payout, not a purchase — sign it with your payout secret key (testcredit in the test data), not the purchase secret key used for create order.
Code example
\Flitt\Configuration::setMerchantId(1549901);
\Flitt\Configuration::setCreditKey('testcredit'); // payout requests use the credit key, not the secret key
$orderData = \Flitt\IbanCredit::credit([
'currency' => 'GEL',
'amount' => 1000,
'receiver_iban' => 'GE00TB0000000000000001',
'receiver_name' => 'Test Receiver'
]);
$order = $orderData->getData();
echo $order['order_status']; // e.g. 'approved', 'declined', 'processing'
$orderData->isValid(); // verifies the response signature
See examples/IbanCredit/credit.php for a full example, including the test IBANs that pass client-side MOD-97 checksum validation.
from flittpayments import Api, Payment
api = Api(merchant_id=1549901,
secret_key='testcredit') # payout secret key, not the purchase one
client = Payment(api=api)
data = {
"currency": "GEL",
"amount": 1000,
"receiver_iban": "GE00TB0000000000000001"
}
response = client.ibancredit(data)
Getting balances¶
Balance available for withdrawal to IBAN can be obtained with report_id=1023.
Python example
>>> from flittpayments import Api, CompanyReports
...
... api = Api() # CompanyReports doesn't use Api's merchant_id/secret_key
... client = CompanyReports(api=api)
... data = {
... "application_id": "1019",
... "key": "test",
... "report_id": 1023,
... "merchant_id": 1549902
... }
... report = client.get(data)
... print(report)
...
{'rows_page': 1, 'rows_on_page': 10, 'rows_count': 1, 'data': [['GE00TB0000000000000001', '49.50', 'GE00BG0000000000000001', '12017.16']], 'fields': ['tbc_iban', 'tbc_current_balance', 'bog_iban', 'bog_current_balance']}
For detailed explanation of report parameters and usage, see Reports.