The POST /refunds call allows your platform to create a new refund. Refunds facilitate the return of money from the merchant to the payer. Note: A Payment must be created within the last 60 days and have a status
of complete
in order to refund it. If your platform has a custom refund limit, then use that number instead.
INVALID_PARAMS, PAYMENT_CANNOT_BE_REFUNDED
NOT_AUTHORIZED
UNEXPECTED_ERROR
{- "amounts": {
- "total_amount": 300,
- "currency": "USD",
- "fee_refund_amount": 50
}, - "order_id": "ordr-123-abc",
- "payment_id": "18752aba-25d0-4328-aac9-a0ba7216eb67",
- "refund_reason": "Item(s) returned",
- "reference_id": "reference_id_0"
}
{- "amounts": {
- "total_amount": 100,
- "currency": "USD",
- "fee_refund_amount": 0
}, - "create_time": 1509140695,
- "custom_data": null,
- "failure_reason": null,
- "id": "9b53d5fd-17b1-400c-b197-3204f4d6171c",
- "order": null,
- "owner": {
- "id": "40200612-e849-4172-8308-657cf3a0de27",
- "path": "/accounts/40200612-e849-4172-8308-657cf3a0de2",
- "resource": "accounts"
}, - "path": "/refunds/9b53d5fd-17b1-400c-b197-3204f4d6171c",
- "payment": {
- "id": "a8ca756e-5a62-4c2a-80fd-9b82563d47cb",
- "path": "/payments/a8ca756e-5a62-4c2a-80fd-9b82563d47cb",
- "resource": "payments"
}, - "payment_method": {
- "id": "00000000-6363-0000-0000-0000c27db2f3",
- "path": "/payment_methods/00000000-6363-0000-0000-0000c27db2f3",
- "resource": "payment_methods"
}, - "pending_reasons": null,
- "refund_reason": "example refund reason",
- "resource": "refunds",
- "status": "completed",
- "txnr_app_fee_refund": null,
- "txnr_merchant_refund": {
- "id": "7c59ebf4-d6ae-4125-85f8-515b95725501",
- "path": "/transaction_records/7c59ebf4-d6ae-4125-85f8-515b95725501",
- "resource": "transaction_records"
}, - "api_version": "3.0",
- "reference_id": "reference_id_0"
}