/cancel
Cancel pending orders before they are captured by FlexFactor.
Merchant Initiated Transactions (MIT) are sent to FlexFactor for an asynchronous evaluation.
If the customers cancel their subscriptions while they are pending over at FlexFactor, you can cancel them by using the /cancel endpoint.
Prerequisites to invoke this API:
- Authenticate and send the bearer token for this call.
Request
Details
HTTP Method | POST |
Endpoint - Sandbox | <https://api-sandbox.flex-charge.com/v1/orders/{id}/cancel> |
Endpoint - Production | <https://api.flex-charge.com/v1/orders/{id}/cancel> |
{id} | FlexFactor 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.
Response
Status Code | 200 |
Response Body | Empty |
Updating the status order
After receiving a successful response from /cancel, you need to update this order in your CRM with the corresponding status.
Payload examples
Request
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 '
{}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{}
Updated 3 months ago