createRefundSession
Overview
This mutation takes a payment ID and creates a refund session for the associated payment.
Special Considerations
- Takes a payment ID as input.
Inputs
MutationCreateRefundSessionArgs
Required Data
paymentID: string
Returns
Promise<SuccessResult>
A promise containing the success message.
Example
Running this mutation:
mutation {
createRefundSession(paymentId: "ckbi3uvnvbiv50a62zpri3bs7") {
message
}
}
Gives us:
{
"data": {
"createRefundSession": {
"message": "Refund session created!"
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
You've reached the limit for refunds on this payment. (I-4729)
- No further refunds are allowed for this payment.
You can only refund payments once they are complete. (I-4724)
- The payment has not processed fully yet, wait to start a refund session.
The refund period of 90 days has expired. (I-4725)
- The payment has been complete for too long to be refunded.
This payment has already been refunded. (I-4723)
- A previous full refund has already been issued for this payment.
You have reached your maximum refund attempts for this payment. (I-4720)
- There have been too many refund sessions for this payment.
You can only refund payments made to your account. (I-4726)
- The payment ID specified a payment not made to this account. Check the ID and account.
You cannot send a refund to this account. The recipient's account has been disabled. Please contact support. (I-4727)
- The recipient account is no longer able to process transactions. Contact support.