/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 MethodPOST
Endpoint - Sandboxhttps://api-sandbox.flex-charge.com/v1/orders/{orderId}/cancel
Endpoint - Productionhttps://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.
AuthenticationBearer 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:


Response

Status Code200
Response BodyEmpty
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.