Refund the payment an attach attempt took
Called by refunds-api. The attachment names the wallet that took the payment, the payment's id there, its amount and when it was paid. For Maya the payment is voided on the day it was paid (Philippine time) and refunded afterwards. Each reference_id reaches the wallet at most once: a repeat returns the first outcome. A refusal by the wallet, an error or no answer from it, is returned as status failed with a code in provider_error. A 4xx means nothing was reversed; any 5xx means the outcome is not final and the refund must stay pending. In test mode the wallet is not called.
Request
- Base URLhttps://ewallets-api.paymongo.com
- URLhttps://ewallets-api.paymongo.com/v1/attachments/attach_attempt/{attach_attempt_id}/refunds
- AuthHTTP bearer
Path parameters
Attach attempt id of the payment
Headers
Mode of the refund: true or false
Request body
Example request
{
"amount": 5000,
"currency": "PHP",
"reason": "requested_by_customer",
"reference_id": "ref_xyz789"
}Response
The wallet reversed the payment, the wallet refused, or a repeat of an earlier outcome
Example response
{
"data": {
"provider_error": "PY0123",
"reference_id": "ref_xyz789",
"status": "failed"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.