declinePaymentRequest
Overview
This mutation allows the current user to decline a payment request, given a PaymentRequestId.
Special Considerations
- You must be logged into an account before calling this mutation.
- You must enter a valid PaymentRequestId (string).
Inputs
DeclinePaymentRequestArgs
Required Data
paymentRequestId: string
Returns
Promise<SuccessResult>
A promise containing the following data:
message: string
Example
Running this mutation:
mutation {
declinePaymentRequest (paymentRequestId: "ckb9tm8nc008x0729ce97glbo") {
message
}
}
Gives us:
{
"data": {
"declinePaymentRequest": {
"message": "Payment request declined"
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
There was an error accessing the payment request. (I-4602)
- Provide a valid payment request Id.
You do not have permission to decline this payment request. (I-4603)
- If the payment request was not made to you, or some other issue, you cannot decline the payment request.