The capture operation is designed to charge the amount previously hold on the card with request for pre-authorization with the parameter preauth = Y
.
This operation is also called a two-stage payment scheme. The first stage is a purchase operation with preliminary hold of the amount. The second stage is the capture of a blocked amount.
The capture can be performed both in full or in partial amount.
Notice!
Parameter | Type | Description | Example |
---|---|---|---|
order_id | string(1024) | Order ID which is generated by merchant. mandatory | ID1234 |
merchant_id | integer(12) | Merchant unique ID. Generated by FONDY during merchant registration. mandatory | 1 |
signature | string(40) | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response mandatory | 1773cf135bd89656131134b98637894dad42f808 |
version | string(10) | Protocol version. Default value: 1.0 | 1.0 |
amount | integer(12) | Capture amount mandatory | 1020 (EUR) means 10 euros and 20 cents |
currency | string(3) | Order currency. Supported values: EUR — Euro USD — US Dollar GBP — Pound sterling UAH — Ukrainian Hryvnia mandatory | USD |
Parameter | Type | Description | Example |
---|---|---|---|
order_id | string(1024) | Order ID which is generated by merchant. | ID1234 |
merchant_id | integer(12) | Merchant unique ID. Generated by FONDY during merchant registration. | 1 |
capture_status | string(50) | Capture processing status. Can contain next values: hold — capture is declined by FONDY payment gateway or by bank or by external payment system captured — capture completed successfully | approved |
response_status | string(50) | Request processing status. If parameters sent by merchant did not pass validation then failure , else success | |
signature | string(40) | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response | 1773cf135bd89656131134b98637894dad42f808 |
response_code | integer(4) | Response decline code | 1008 |
response_description | string(1024) | Response decline reason | Parameter `amount` is mandatory |
Capture request always generated by merchant using host-to-host request to URL https://pay.fondy.eu/api/capture/order_id
Host-to-host API supports the following text formats:
Response is always returned in request context in the same content-type. So if request is sent in JSON, response will be sent in JSON format too.
Content Type: application/json
Request
{ "request":{ "order_id":"test7926651365", "currency":"USD", "amount":"1", "merchant_id":"1", "signature":"b1ed592ff76ddca287503b11c1aad70bb1c67f37" } }
Normal response
{ "response":{ "order_id":"test309906285", "response_status":"success", "response_code":"", "capture_status":"captured", "response_description":"", "merchant_id":"1" } }
Response in case of error
{ "response":{ "response_status":"failure", "error_message":"Order Not Found", "error_code":"1018" } }
Content Type: application/xml
Request
<?xml version="1.0" encoding="UTF-8"?> <reqest> <order_id>test7926651365</order_id> <currency>USD</currency> <amount>1</amount> <merchant_id>1</merchant_id> <signature>b1ed592ff76ddca287503b11c1aad70bb1c67f37</signature> </request>
Normal response
<?xml version="1.0" encoding="UTF-8"?> <response> <order_id>test6622534987</order_id> <response_status>success</response_status> <response_code /> <capture_status>captured</capture_status> <response_description /> <merchant_id>1</merchant_id> </response>
Response in case of error
<?xml version="1.0" encoding="UTF-8"?> <response> <response_status>failure</response_status> <error_message>Order Not Found</error_message> <error_code>1018</error_code> </response>
Content Type: application/x-www-form-urlencoded
Request
order_id=test6622534987¤cy=USD&amount=1&merchant_id=1 &signature=6ccbfeb82894b5c51855e032da1e7a3bee65f3a3
Normal response
order_id=test7101250216&response_status=success&response_code= &capture_status=captured&response_description=&merchant_id=1
Response in case of error
response_status=failure&error_message=Order+Not+Found&error_code=1018