POST
/
payments
/
setDecline
curl --request POST \
  --url https://api.magebank.ai/payments/setDecline \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "paymentId": "<string>"
}'
{
  "message": "Payment declined successfully",
  "status": "Decline",
  "txHash": null
}

Rejection Action: Cancel pending payments by declining them, which prevents any funds from being transferred.

Request Headers

x-api-key
string
required

Your API key for authentication

Request Body

paymentId
string
required

The short ID of the payment to decline

Response

message
string

Confirmation message indicating the payment was declined

status
string

The new approval status (“Decline”)

txHash
string

Transaction hash (will be null for declined payments)

{
  "message": "Payment declined successfully",
  "status": "Decline",
  "txHash": null
}

Status Codes

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

Final Action: Declined payments cannot be later approved. A new payment must be created if necessary.

Status Change: The payment’s status will be updated to “Confirmed” with an approval status of “Decline”.