Cancel a Pending Settlement
PUT /cardpayments/v1/accounts/account_id/settlements/settlement_id
Use a PUT request to update a settlement's status to CANCELLED.
curl -X PUT https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/0fd73475-9837-4613-8464-355a3a99b8bb \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
"status": "CANCELLED"
}'
Prior to trying the example, you should:
- Replace the account number (89987201) in the URL with the test account number you received.
- Replace the settlement ID in the URL with the settlement ID returned in the authorization response.
- Replace the API key (after the -u) with the API key you received.
The cancel pending settlement request must reach Paysafe Group before the original settlement request is batched, which varies by bank.
Depending on your account configuration, the amount held on the customer's card may or may not be immediately released. Please contact your account manager for details.
The request contains the following parameters:
Element | Type | Required? | Description |
---|---|---|---|
status | enum | Yes | This is the status of the settlement. Possible values are:
|
{
"links":[
{
"rel":"self",
"href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/0fd73475-9837-4613-8464-355a3a99b8bb"
}
],
"id":"0fd73475-9837-4613-8464-355a3a99b8bb",
"txnTime":"2017-05-05T13:30:44Z",
"status":"CANCELLED"
}
The response contains the following parameters:
Element | Type | Description |
---|---|---|
links | array of link objects | This parameter contains a single settlement link which can be used to fetch details about the settlement (capture). |
id | string length<=36 | This is the unique ID for the settlement (capture). This ID can be used to look up the settlement details. |
txnTime | string | This is the transaction time and date in UTC format. |
status | enum | This is the status of the settlement. Possible values are:
|