GoCardless
SEPA direct-debit collection of a sales invoice through the company's connected GoCardless account, and the refund of that collection. Both are read and opened on the invoice itself, and both are all-or-nothing: a collection covers the invoice's whole outstanding amount, a refund covers the collection in full. The status reported is the one GoCardless itself holds, so a 201 means the request was accepted by GoCardless, never that the money has moved - poll the GET on the same path.
Retrieve the GoCardless collection of an invoice
Returns the most recent GoCardless direct-debit collection opened on the invoice, with the status GoCardless itself reports. Answers 404 when the invoice carries no collection - that is the normal answer before one is opened, not an error about the invoice.
Open a GoCardless collection on an invoice
Opens a SEPA direct-debit collection for the invoice's whole outstanding amount through the company's connected GoCardless account. When the customer has not yet authorized a mandate, an authorization request is emailed to the contact named by `contact_id` and the collection is returned in `pending_authorization`; the debit itself follows once the mandate is authorized. The body is optional and is only needed for that first authorization. Requires the `gocardless_payment` feature and a company whose offer allows sales.
Retrieve the GoCardless refund of an invoice
Returns the most recent refund requested on the invoice's GoCardless collection, and - once issued - the credit note for it: issued when the refund settles or, failing that, 45 days after it was paid. Answers 404 when no refund was ever requested.
Refund the GoCardless collection of an invoice
Refunds the invoice's settled GoCardless collection IN FULL and issues the matching credit note once the refund settles or, if it never does, 45 days after it was paid. A refund replacing one whose funds came back carries the credit note already issued, from creation. Partial refunds are not supported. Takes no request body: the amount is the collection's own. A 201 means the refund was accepted by GoCardless, not that the money has arrived - poll `GET` on this same path and read `status` and `settled_at`. Requires the `gocardless_payment` feature and a company whose offer allows sales.