Update a reversal
This endpoint is to approve a reversal. Only reversals with status
pending_approval are allowed to be updated.Parameters
status
enumThe status for the reversal.
Possible enum values
pending
Required
description
stringThe description for the reversal (maximum of 10 characters).
Optional
Returns
Returns the reversal associated with the id.
- cURL
- Node.js
- Python
PUT
/payments/:payment_id/reversals/:reversal_idcurl https://production.methodfi.com/payments/pmt_rPrDPEwyCVUcm/reversals/rvs_eaBAUJtetgMdR \
-X PUT \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"status": "pending"
}'
PUT
/payments/:payment_id/reversals/:reversal_idconst reversal = await method
.payments('pmt_rPrDPEwyCVUcm')
.reversals
.update('rvs_eaBAUJtetgMdR', { status: 'pending' });
PUT
/payments/:payment_id/reversals/:reversal_idreversal = method
.payments('pmt_rPrDPEwyCVUcm')
.reversals
.update('rvs_eaBAUJtetgMdR', { 'status': 'pending' })
RESPONSE
{
"id": "rvs_eaBAUJtetgMdR",
"pmt_id": "pmt_rPrDPEwyCVUcm",
"target_account": "acc_JMJZT6r7iHi8e",
"trace_id": null,
"direction": "debit",
"description": "PmtRvrsl",
"amount": 5000,
"status": "pending",
"error": null,
"created_at": "2020-12-09T00:42:31.209Z",
"updated_at": "2020-12-09T00:43:30.996Z"
}