creditAndRefundInvoice
Creates a credit invoice and attempts a refund at the payment provider.
Arguments
Argument | Description |
---|---|
invoiceId (ID) | ID of the invoice to be refunded. |
refundReason (string) | The reason for the refund; will be added to the refund notes by the payment provider. |
Example:
Refund the invoice with ID 63, using the reason “Example refund reason”, return validation errors (if any) and retrieve the refund record and credit invoice.
mutation {
creditAndRefundInvoice(input: {
invoiceId: "63",
refundReason: "Example refund reason"
}) {
invoice {
id
}
creditInvoice {
id
}
refund {
id
}
refundErrors {
attribute
message
}
}
}