POST
/
payments
/
setApprove
curl --request POST \
  --url https://api.magebank.ai/payments/setApprove \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "paymentId": "<string>"
}'
{
  "message": "Approval Status Done."
}

Authorization Step: Approve payments that are waiting for authorization to proceed with blockchain fund transfer.

Request Headers

x-api-key
string
required

Your API key for authentication

Request Body

paymentId
string
required

The short ID of the payment to approve

Response

message
string

Confirmation message indicating the approval status has been updated

{
  "message": "Approval Status Done."
}

Status Codes

Status CodeDescription
200Payment approved successfully
400Bad Request - Missing payment ID
404Not Found - Payment not found
500Internal Server Error

Status Transition: Only payments with an approval status of “Waiting for Sender Approval” can be approved.

Post-Approval Process: Once approved, the payment will be processed on the blockchain and its status will change to “New”, then to “Confirmed” once processed.