Reject Settlements
Reject settlements initiated by you or your counterparties. See the Guide.
-
You can reject settlements that either you or your counterparties initiate. Use
"rejected"if your counterparty initiated the settlement, or"canceled"if you initiated the settlement.The settlement cancels. Your Go Account releases any assets that were in
holdstate, freeing them for other transactions.Prerequisites: You must have completed Get Started, Deposit Assets, and Add Counterparties. A settlement must exist.
// 1. Reject Settlement
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export ACCOUNT_ID="<YOUR_ACCOUNT_ID>"
export APPROVAL_REQUEST_ID="<APPROVAL_REQUEST_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export PAYLOAD="<SETTLEMENT_PAYLOAD>"
export SIGNATURE="<YOUR_PUBLIC_KEY>"
curl -X PUT \
https://app.bitgo-test.com/api/clearing/v1/enterprise/$ENTERPRISE_ID/account/$ACCOUNT_ID/approval-requests/$APPROVAL_REQUEST_ID \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"status": "rejected"}'
// "rejected" if your counterparty initiated the settlement
// "canceled" if you initiated the settlement
// 1. Reject Settlement
// Use the REST API for this step (see cURL tab)
Response
// 1. Reject Settlement Response
{
"settlementId": "string",
"createdAt": "2019-08-24",
"updatedAt": "2019-08-24",
"id": "string",
"accountId": "string",
"status": "canceled",
"payload": "string"
}