Skip to main content
PATCH
/
payment-request
/
{id}
/
decline
Decline Payment Request
curl --request PATCH \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/payment-request/{id}/decline \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "<string>"
}'
{
  "message": "Payment request declined successfully",
  "paymentRequest": {
    "id": "0654cd19-cea3-4fad-b92e-4033c4252c79",
    "status": "declined"
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/payment-request/example-id/decline', {
  method: 'PATCH',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "reason": "sample-reason"
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

Payment Request ID

Body

application/json
reason
string

Optional reason for the decline

Response

Success

message
string
paymentRequest
object