Skip to content

OrderPayment_VOID#


Description#

This function allows you to void an order payment once an authorization has been made.

Note

Voids must be for the entire payment record captured amount.

Request Body Parameters#

Parameter
Type Description
OrderPayment_ID Number Payment Record Id to void. Note: Only non-captured payments can be voided. (type 3). Once a payment has been captured it must be refunded using OrderPaymnet_Refund
Amount Number Amount to Void. Number, not currency formatted.

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_cap Number Total Amount Captured
formatted_total_cap 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_VOID",
    "OrderPayment_ID": 7,
    "Amount": 5.0
}

Example Response#

{
    "success": 1,
    "data": {
        "order_id": 200102,
        "total_auth": 18.0,
        "formatted_total_auth": "$18.00",
        "total_capt": 10.0,
        "formatted_total_capt": "$10.00",
        "total_rfnd": 10.0,
        "formatted_total_rfnd": "$10.00",
        "net_capt": 0.0,
        "formatted_net_capt": "$0.00"
    }
}

Error Responses#

Error Code Error Message Error Description
Error Order payment not found Order number not found.