Skip to main content
POST
/
v1
/
payouts
/
approvals
/
approve
Approve or Decline Payout
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/approvals/approve \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --data '
{
  "authCode": "TRF-1771341301552SNKED",
  "action": "approve",
  "reason": ""
}
'
{
  "status": "success",
  "message": "Payout approved successfully"
}

Overview

This endpoint allows you to approve or decline a pending payout request. You must provide the authCode from the pending approval record along with the desired action. A reason is required when declining.

Request

Method: POST URL: /v1/payouts/approvals/approve

Parameters

NameInTypeRequiredDescription
x-carbon-keyHeaderstringYesAPI key for authentication.

Request Body

FieldTypeRequiredDescription
authCodestringYesAuthorization code of the pending payout (e.g. TRF-...).
actionstringYesAction to take: approve or decline.
reasonstringRequired if action is declineReason for declining the payout.
{
  "authCode": "TRF-1771341301552SNKED",
  "action": "approve",
  "reason": ""
}
When action is decline, the reason field is required. For approve, it can be left as an empty string or omitted.

Response

Status Code: 200 OK Content-Type: application/json

Example Response (Approved)

{
  "status": "success",
  "message": "Payout approved successfully"
}

Example Response (Declined)

{
  "status": "success",
  "message": "Payout declined successfully"
}

Error Responses

Status Code: 400 Bad Request
{
  "status": "failed",
  "message": "invalid authorization code"
}
Status Code: 422 Unprocessable Entity Returned when action is decline but reason is missing.
{
  "status": "failed",
  "message": "reason is required when declining a payout"
}

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Body

application/json

Provide the required values for the request body.

authCode
string
required

Authorization code of the pending payout.

Example:

"TRF-1771341301552SNKED"

action
enum<string>
required

Action to take: approve or decline.

Available options:
approve,
decline
Example:

"approve"

reason
string

Reason for declining. Required when action is decline.

Example:

""

Response

OK

The response is of type object.