OrderPayment_Capture
Description
This function allows you to capture funds against an existing authorization.
Request Body Parameters
Parameter |
Type |
Description |
OrderPayment_ID |
Number |
Payment Record to Capture against. It must be an open authorization (type 3). The OrderPayment_ID is returned in the OrderList_Load_Query |
Amount |
Number |
Amount to capture. This can be any amount up to the total authorized amount. |
Passphrase |
String |
optional. This is only needed if the client has payment encryption enabled in the store. |
Response Parameters
Parameter |
Type |
Description |
order_id |
Number |
Order Number |
total_auth |
Number |
Total Amount Authorized |
formatted_total_auth |
String |
Currency Formatted Total Amount Authorized |
total_capt |
Number |
Total Amount Captured |
formatted_total_capt |
String |
Currency Formatted Total Amount Captured |
total_rfnd |
Number |
Total Amount Refunded |
formatted_total_rfnd |
String |
Currency Formatted Total Amount Refunded |
net_capt |
Number |
Total amount captured minus total amount refunded |
formatted_net_capt |
String |
Formatted total amount captured minus total amount refunded |
Example Request
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "OrderPayment_Capture",
"OrderPayment_ID": 8,
"Amount": 8.0
}
Example Response
{
"success": 1,
"data": {
"order_id": 200102,
"total_auth": 26.0,
"formatted_total_auth": "$26.00",
"total_capt": 18.0,
"formatted_total_capt": "$18.00",
"total_rfnd": 10.0,
"formatted_total_rfnd": "$10.00",
"net_capt": 8.0,
"formatted_net_capt": "$8.00"
}
}