Create withdrawal
Withdrawal can be performed only after initial purchase with the rectoken
which will be referencing the purchase.
To create purchase, refer to any of the ways to start accepting payments:
- create order with redirect
- create order with direct
- embedded checkout
- SDK
- CRM&CMS
- Apple Pay
- Google Pay
Additional parameter must be sent during purchase order creation to obtain rectoken
in response:
Parameter | Value | Description |
---|---|---|
required_rectoken |
Y |
Flag which indicates whether card token will be returned in response. |
Endpoint for withdrawal creation
Withdrawal operation
POST /api/p2pcredit
This endpoint expects POST
request in JSON
format with parameters.
Request parameters
One of the parameters receiver_rectoken
or external_rectoken
is mandatoiry!
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. Supported values: EUR — Euro USD — US Dollar GBP — Pound sterling mandatory CZK — Czech Republic Koruna GEL - Georgian lari UZS - Uzbekistan sum Full list of supported currencies |
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 |
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 |
product_id |
string(1024) | optional | Merchant product or service id |
receiver_rectoken |
string(40) | optional | Card token from initial purchase operation, returned by Flitt in parameter rectoken |
external_rectoken |
string(40) | optional | Card token from initial purchase operation, returned by UFC in parameter TRANSACTION_ID |
Examples
Request example with Flitt token:
{
"request": {
"order_id": "test_1234312142",
"merchant_id": "1549901",
"order_desc": "Test order",
"amount": 1000,
"currency": "GEL",
"receiver_rectoken": "I0wh7fBmFIdcY6K3Px2QugVrVR65sPafeZkPmRanOiRnXG",
"server_callback_url": "https://myserver.com/callback",
"signature": "51e59ffd263d071da8e1a1fc10b981f459dbe6f1"
}
}
Request example with UFC token:
{
"request": {
"order_id": "test_12343242",
"merchant_id": "1549901",
"order_desc": "Test order",
"amount": 1000,
"currency": "GEL",
"external_rectoken": "bAt6JLX52DUbibbzD9gDFl5Ppr4=",
"server_callback_url": "https://myserver.com/callback",
"signature": "1c1c2374c73267e7be560d80834e4ba28ccda9aa"
}
}
Normal final response: see list of test cards
{
"response": {
"product_id": "",
"masked_card": "444455XXXXXX6666",
"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": "card",
"approval_code": "",
"merchant_id": 1549901,
"payment_id": 818990350,
"card_bin": 444455,
"response_code": "",
"card_type": "VISA",
"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\": \"VISA\", \"card_product\": \"empty_visa\", \"card_category\": null, \"timeend\": \"21.09.2024 01:22:03\", \"ipaddress_v4\": \"178.54.60.26\", \"payment_method\": \"card\", \"is_test\": true}"
}
}
Response in case of error:
{
"response": {
"error_code": 1002,
"error_message": "Application error",
"request_id": "ghfIuTtVrbWYY",
"response_status": "failure"
}
}