/cancel
This API allows you to cancel pending orders before they are captured by FlexCharge.
Merchant Initiated Transactions (MIT) are sent to FlexCharge for an asynchronous evaluation.
If the customers cancel their subscriptions while they are pending over at FlexCharge, you can cancel them by using the /cancel endpoint.
Request
Details
HTTP Method | POST |
Endpoint - Sandbox | https://api-sandbox.flex-charge.com/v1/orders/{orderId}/cancel |
Endpoint - Production | https://api.flex-charge.com/v1/orders/{orderId}/cancel |
{id} | FlexCharge's unique transaction identifier. This is the orderSessionKey returned by /evaluate and/or /outcome and/or webhook and/or batch response file. |
Authentication | Bearer Token |
Body
This API doesn't require body parameters.
Request example
curl --request POST \
--url https://api-sandbox.flex-charge.com/v1/orders/{id}/cancel //insert orderSessionKey returned by the response to /evaluate
--header 'Authorization: abc123def456' \ //replace with bearer returned by /oauth2
--header 'accept: application/json' \
--header 'content-type: application/*+json' \
--data '
{}
Prerequisites to invoke this API:
- Authenticate and send the bearer token for this call.
Response
Status Code | 200 |
Response Body | Empty |
HTTP/1.1 200 OK
Content-Type: application/json
{}
Updating the status order
After receiving a successful response from /cancel, you need to update this order in your CRM with the corresponding status.
Updated 3 months ago