Expire an order
POST /v1/orders/{trade_no}/expire closes a pending order so its checkout link can no longer accept payment.
Key points
- KukoPay checks the upstream payment state before closing the order to avoid expiring one that has already been paid.
- Handle late or duplicate payment events according to the payment-flow guide; do not assume that closing the browser cancels a payment.
Example
bash
curl -X POST "https://api.kukopay.com/v1/orders/ORD_20260921_0001/expire" \
-H "X-Api-Key: $KUKOPAY_API_KEY" \
-H "Idempotency-Key: expire-ORD_20260921_0001"