NetSuite - Payment creation & events
The process for collecting direct debit payments for NetSuite invoices is outlined in this section.
Note: there are alternative methods for creating payments for invoices as outlined in the FAQs.
Initiating payments
The first step to creating a direct debit payment for a customer with an active mandate is populating & saving the related fields on the NetSuite invoice.
| Field | GC Subtab | Description | Editable? |
|---|---|---|---|
| Due date | N/A | The due date of the invoice. This will determine the charge date for the GoCardless payment. If the due date is after the next possible charge date for the customer's mandate, the GoCardless payment will be charged on the invoice due date. If the due date is before the next possible charge date for the customer's mandate, the GoCardless payment will be charged on the next possible charge date. |
Y |
| Invoice # | N/A | The Invoice # will be set as the payment description in GoCardless. The GoCardless payment description is displayed on email notifications to the customer. | N |
| Pay with GoCardless | GoCardless > Request information | When this checkbox is selected for an open invoice that has a mandate populated and does not have an existing GoCardless payment against it, a payment request will be sent through to GoCardless within 5 minutes following the invoice save. | Y |
| Payment reference | GoCardless > Request information | An optional payment reference can be input before saving an invoice with the "Pay with GoCardless" checkbox selected. When a reference is input, it will populate the payment reference in GoCardless which partially drives how the payment appears on the customer's bank statement. See details here. | Y (10 character limit) |
| Amount due | N/A | The amount due on the invoice will determine the amount of the GoCardless payment. If a credit needs to be applied to the invoice, save it without “Pay with GoCardless” selected to apply the credit. Once the amount due is adjusted, save with “Pay with GoCardless” selected to process the payment. |
Y |
The following non-editable fields will also be populated on the invoice for viewing purposes:
| Field | GC Subtab | Description | Editable? |
|---|---|---|---|
| GoCardless account | GoCardless > Request information | The GoCardless configuration record (i.e. account) that's associated with the customer. | N |
| Integration status | GoCardless > Request information | The status of the payment request to GoCardless: Pending: this means the payment request hasn't been sent to GoCardless yet (either the invoice was saved without the "Pay with GoCardless" checkbox selected, or the invoice was saved with the "Pay with GoCardless" checkbox selected and the request hasn't gone through yet). |
N |
| Mandate | GoCardless > Request information |
The mandate that's assigned to the customer in the invoice currency. If the customer doesn’t have a mandate in the invoice currency, or the mandate is in an unchargeable state (cancelled, expired, etc.), an error message will be displayed upon saving the invoice with the “Pay with GoCardless” field selected.” in the Description column of the last row |
N |
Payment events
After the invoice is saved with the “Pay with GoCardless” checkbox selected, the payment will be created in GoCardless within minutes. A script runs every 5 minutes, and sends payment requests to GoCardless for invoices that meet the following conditions:
- Fully approved & in the open state.
- Related to a customer with a mandate in the “Active” or “Pending Customer Approval” status.
- Has the “GoCardless Account” field populated - this is inherited from the customer record’s “GoCardless Configuration” field.
- Has the “Pay with GoCardless” checkbox selected without an existing GoCardless payment against it.
Once the payment is created in GoCardless, the following fields will be populated or updated on the invoice:
| Field | GC Subtab | Description | Editable? |
|---|---|---|---|
| Integration status | GoCardless > Request information | The status of the payment request to GoCardless: Processed: This means the payment request was successfully sent to GoCardless. The details in the "transaction information" section should be populated at this time. Failed: This means the payment request to GoCardless failed. The related error message will be displayed in the "Integration error" field. |
N |
| Integration error | GoCardless > Request information | When this "Integration status" field is set to "failed", the error message will be displayed in this field to explain why it failed. After the appropriate adjustments have been made, you can re-attempt the payment request by re-saving the invoice with the "Pay with GoCardless" box selected. |
N |
| Payment status | GoCardless > Transaction information | The status of the GoCardless payment. It will initially be set to “pending submission”. This means, the payment has been created in GoCardless, and is pending submission to the bank for processing. | N |
| Description | GoCardless > Transaction information | The description associated with the payment status. | N |
| Charge date | GoCardless > Transaction information | The charge date of the GoCardless payment. It will equal the invoice due date unless the invoice due date was prior to the next possible charge date on the customer's mandate. | N |
| GoCardless payment ID | GoCardless > Transaction information | The GoCardless payment ID. | N |
Data flow - payment creation
As the GoCardless payment processes, the following fields will be updated on the invoice so you have full visibility into where your payment stands within NetSuite:
| Field | GC Subtab | Description | Editable? |
|---|---|---|---|
| Payment status | GoCardless > Transaction information | The status of the GoCardless payment. It will be set to one of the following: Pending submission: The payment has been created in GoCardless, and is pending submission to the bank for processing. Submitted: The payment has been submitted to the bank for processing Confirmed: The payment has been collected from the customer’s bank account, and is now being held by GoCardless pending being paid out. Paid out: The payment has left GoCardless and has been sent to the creditor’s bank account. Failed: The payment could not be collected, usually because the customer did not have sufficient funds available. Resubmission requested: A request to resubmit the failed payment was initiated (see the Payment failures section) Charged back: The customer initiated a chargeback through their bank, and the payment has been returned to the customer. Cancelled: The payment was cancelled. Chargeback settled: The chargeback has been settled in a payout Late failure settled: The late failure has been settled in a payout |
N |
| Reason code | GoCardless > Transaction information | The reason code that’s associated with the payment status. This only applies to some payment statuses such as failed, charged back, etc. See details here. | N |
| Description | GoCardless > Transaction information | The description associated with the payment status. See details here. | N |
Data flow - payment status updates
Payment paid out event
Once a GoCardless payment is settled, it transitions to the “Paid out” status. At this point,
-
A payment record will be created in NetSuite and applied to the related invoice. The Payment will be created with the Undeposited Funds account. It will initially have the Not Deposited status, but it will transition to Deposited once the corresponding payout has reconciled in NetSuite.
Note: If the invoice balance is adjusted after the GoCardless payment is initiated (for example, by applying a credit), there would be a discrepancy between the GoCardless payment amount and the invoice balance. In this case, the integration applies up to the open invoice balance to the invoice and leaves any remaining amount from the payment unapplied.
- The invoice will be marked as “Paid in full”.
- The payment status, reason code, and description fields will be updated on the invoice as outlined in the above section.
Data flow - payment paid out event
Payment failed event
If a payment fails, the payment status details will be updated on the invoice, including the failure reason code and description.
Payment chargeback & late failure events
After a GoCardless payment is "paid out", it could fail or become charged back in rare cases. When this occurs, the integration will unapply the Payment from the Invoice in NetSuite, create a Refund record to represent the chargeback or late failure, and apply the Payment to that Refund. The invoice will be re-opened as a result.
The Payment Status field on the invoice will also be updated to reflect the post-payout chargeback or failure.
Refund and deposit creation
The handling of post-payout chargeback and late failures differs slightly depending on whether the Payment is Deposited or Not Deposited in NetSuite at the time of the event.
If the Payment was not yet deposited at the time of the chargeback or late failure settlement:
- The Payment will be unapplied from the Invoice
- A Refund will be created and the payment will be applied to the Refund
- A zero-amount Deposit will be created to clear the Undeposited Funds account without any net GL impact.
If the Payment was already deposited at the time of the chargeback or late failure settlement:
- The Payment will be unapplied from the Invoice
- A Refund will be created and the Payment will be applied to the Refund
The Refund is created using the following details:
- Customer - sourced from the Payment
- Account - Undeposited Funds if the Payment was Not Deposited. Deposit bank account if the Payment was Deposited.
- Amount - sourced from the Payment
- Currency - sourced from the Payment
- Exchange Rate - sourced from the Payment
- Date - Arrival date of the payout in which the chargeback or late failure was settled
- Credit side of the transaction - Sourced from the Refund’s Account field (see above)
- Debit side of the transaction - The AR account is sourced from the charged back or late failed Payment record in NetSuite.
Refunds and Deposits (when applicable) are created using the chargeback_settled and late_failure_settled events from GoCardless, rather than the initial charged_back and failed events. This ensures that records are only created in NetSuite once the chargeback or late failure has settled in a payout, and that dates align with what appears on your bank statement.
The Refund date and corresponding Deposit date (when applicable) are set to the arrival_date of the payout in which the chargeback or late failure was settled.
Payment status updates
The Payment Status field on the GoCardless > Transaction Information subtab of the invoice is updated as follows:
- The charged_back and failed events update the Payment Status field to reflect the chargeback or failure as soon as it occurs - no additional actions are triggered from these events.
- The chargeback_settled and late_failure_settled events also update the same Payment Status field when settlement is confirmed and trigger the Refund creation.