Skip to main content

Update payment status

Updates a payment's status with the parameters sent.

Parameters


status

string
The next status to which the payment should transition.

Required


The desired payment error code to simulate. Required when status is reversal_required or reversal_processing.
Possible enum values

10001

Simulates a failure with the insufficient funds error.

Optional


Returns


Returns a payment with the updated status.

POST /simulate/payments/:payment_id
curl https://dev.methodfi.com/simulate/payments/pmt_rPrDPEwyCVUcm \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"status": "processing"
}'
RESPONSE
{
"id": "pmt_rPrDPEwyCVUcm",
"reversal_id": null,
"source_trace_id": null,
"destination_trace_id": null,
"source": "acc_JMJZT6r7iHi8e",
"destination": "acc_AXthnzpBnxxWP",
"amount": 5000,
"description": "Loan Pmt",
"status": "processing",
"error": null,
"metadata": null,
"estimated_completion_date": "2020-12-11",
"source_settlement_date": "2020-12-09",
"destination_settlement_date": "2020-12-11",
"fee": null,
"created_at": "2020-12-09T00:42:31.209Z",
"updated_at": "2020-12-09T00:43:30.996Z"
}

Valid status transitions

The following are valid status transitions supported by this simulation.

Current StatusNext StatusDescription
pendingprocessingThe payment has started processing and can no longer be canceled.
processingsentThe payment has been executed and sent to the banking networks.
sentreversal_requiredThe retrieval of funds from the source account failed after the funds reached the destination account. A Reversal will automatically be created for this payment, and must be approved.
sentreversal_processingFor some organizations, a Reversal is automatically approved. As a result, instead of transitioning from sent to reversal_required and being required to approve the created reversal, these organizations can immediately transition a payment from sent to reversal_processing.
reversal_processingreversedIf a payment's associated destination account is of type ach, a reversal will be retrieving the funds back from the destination account.
reversal_processingsettledIf a payment's associated destination account is of type liability, a reversal would re-initiate the pulling of funds from the source account.