Post Purchase Actions

After a payment reaches a final state you can capture, cancel or refund.

Capture (pre-auth)
If you created the order with pre_auth: true, the payment is authorised but not captured. Capture it:

PUT /api/pay/v1/orders/{order_id}/capture {"merchant_capture_reference": "cap-0001", "capture_amount": { "value": 5000, "currency": "SGD" }}
Omit capture_amount to capture the full authorised amount.

Cancel an unpaid order
PUT /api/pay/v1/orders/{order_id}/cancel
Only works before the order is paid.

Cancel pending payments
PUT /api/pay/v1/orders/{order_id}/cancel-payments

Refunds
POST /api/pay/v1/refunds/{order_id}

POST /api/pay/v1/refunds/{order_id}
{
  "merchant_order_reference": "rf-0001",
  "order_amount": { "value": 500, "currency": "SGD" }
}


Note: Use the full order amount for a full refund, or a lower amount for a partial refund.


Did this page help you?