curl --request PATCH \
--url https://api.royalti.io/payment-request/{id}/decline \
--header 'Authorization: Bearer <token>'{
"message": "Payment request declined successfully",
"paymentRequest": {
"id": "0654cd19-cea3-4fad-b92e-4033c4252c79",
"status": "declined"
}
}Decline Payment Request
curl --request PATCH \
--url https://api.royalti.io/payment-request/{id}/decline \
--header 'Authorization: Bearer <token>'{
"message": "Payment request declined successfully",
"paymentRequest": {
"id": "0654cd19-cea3-4fad-b92e-4033c4252c79",
"status": "declined"
}
}/payment-request/{id}/decline endpoint declines a specific payment request.
Method:PATCH
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the payment request |
const response = await fetch('https://api.royalti.io/payment-request/example-id/decline', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
console.log(data);