Customer Payment

Customer Payments are used to record financial transactions against Sales Orders and Sales Credits, allowing an order to be marked as paid without any accounting journals being created. Prior to release of this service message, orders were marked as paid by the presence of Sales Receipt journals.

Customer Payments can be one of the following types:

  • RECEIPT : Money received from customer (eg to pay for a Sales Order)
  • PAYMENT : Money paid to customer (eg to refund a Sales Credit)
  • AUTH : Authorization-only
  • CAPTURE : Capture a payment against an Authorization
  • VOID : An Authorization that will not be captured should be voided

The direction of money movement is determined by the payment type. A RECEIPT is money received from customer into your business (typically for a Sales Order), and a PAYMENT is money paid from your business to the customer (typically for a Sales Credit).

A Customer Payment requires a Payment Method code. These may or may not exist as Brightpearl Payment Methods; allowing you to mark an order as paid before you create the Payment Method. If a Payment Method with a matching code exists, and the Customer Payment is of type (RECEIPT, PAYMENT, CAPTURE), then a Sales Receipt will also be created when you create the payment. The Journal ID of the Sales Receipt will be inserted into the Customer Payment entry if the Sales Receipt is created successfully. The Bank Account used for the Sales Receipt is determined by:

  • The currency of the payment
  • The bank account for this currency as set on the Payment Method

If no bank account is set for the Payment Method, or no Payment Method exists with the given payment method code, then no Sales Receipts are created. If Bank Accounts or Payment Methods are later added, no Sales Receipt is created retrospectively for the original Customer Payment.

By introducing the Customer Payment entity, we have added the ability for an order to be paid by “Authorization-only” payments. When the Authorization is later captured, a Sales Receipt journal is created, if the linked Payment Method has a bank account set for the payment currency. Multiple partial CAPTUREs for an AUTH is fine. You can also CAPTURE more than the original AUTH if you need; Brightpearl will record these as overpayment Sales Receipts, if a Bank Account is linked.

When posting an AUTH, you must specify an authorization_expiry. If this date is passed, a CAPTURE against the same AUTH (linked by transaction_code) will be rejected.

Customer Payments are linked by having the same transaction code. So a CAPTURE for an AUTH will need to use the same transaction code. Similarly, a VOID will relate to the original payment using the transaction code.

Transaction ref is the unique reference for the payment, usually set by the payment provider (, Sagepay, PayPal etc).

Posting a Customer Payment for an order will automatically update the Order Payment Status of that order.

When a transaction reference is provided a check to the uniqueness of payment method code and transaction reference is triggered.