Skip to content

Credit limits and net terms

Steps for

How it works

How credit and net terms work, from setup to payment

Set terms on the customer

Credit limit, balance and net terms in the customer metafield
(this flows forward)

Customer sees them

In the Financials section of My Account
(this flows forward)

Customer pays on account

At checkout, within their credit limit
(this flows forward)

Order arrives with terms

On Shopify, a draft order with payment terms and a due date
(this flows forward)

You invoice and collect

Through SparkLayer Invoices, your store, your own files or an app

Shopify only

To compare Pay on Account with the other payment methods, step by step, see the interactive guide How payments work.

Before you start:

  • Pay on Account or Pay by Invoice is turned on for the customer's group. Credit limits only apply to Pay on Account; net terms apply to both. See Payment methods.
  • The payment on account metafield exists in your store. You set it up once: see The payment on account metafield.

The payment on account metafield

A metafield is an extra field on a record in your store admin. Credit limits, balances and net terms all live in one customer metafield.

For other platforms, see the developer docs.

Metafield details, for adding it by hand
ItemValue
Custom data typeCustomers. On Shopify, see customer metafields (opens in a new tab).
Metafield typeJSON
Namespacesparklayer
Keypayment_on_account
ValueSet on each customer record, for example {"credit_limit":1000,"balance":250,"net_terms":"30_days"}. Include only the properties you use.

The value is a short piece of text in a set format (JSON), with these properties:

PropertyWhat it doesExample
credit_limitThe most the customer can owe you.1000
balanceWhat the customer owes you now.250
currency_codeThe currency to show the limit and balance in, if you sell in more than one.usd
net_termsThe customer's payment terms. See supported values.30_days
balance_dateThe date of an opening balance, for the real-time account balance. See Payment methods.2025-01-01T18:00:00+08:00

What to enter

Fill in the form and copy the value it writes. Leave out anything you don't use, and enter amounts without a currency symbol.

Build the value Fill in what you need and leave the rest blank.
Paste into sparklayer.payment_on_account
Fill in a value above

Add a Balance date only for an opening balance on Shopify: the date the Balance was owed from, which SparkLayer tracks new orders and payments from. Pick it in the form and it's written in the format SparkLayer needs: the date, the time and your time zone's offset from UTC, such as 2025-01-01T00:00:00+00:00 for midnight on 1 January 2025 in the UK. A date needs a balance with it.

These are the common values, if you'd rather copy one:

To give the customerEnter
A credit limit of 1,000{"credit_limit":1000}
A credit limit of 1,000 and a balance of 250{"credit_limit":1000,"balance":250}
Net 30 payment terms only{"net_terms":"30_days"}
A credit limit, a balance and Net 30 terms{"credit_limit":1000,"balance":250,"net_terms":"30_days"}
A credit limit and balance in US dollars, if you sell in several currencies{"credit_limit":1000,"currency_code":"usd","balance":250}
A credit limit and an opening balance of 250 owed on 1 January 2025 (UK time), for the real-time account balance on Shopify{"credit_limit":1000,"balance":250,"balance_date":"2025-01-01T00:00:00+00:00"}

Set a credit limit and account balance

  1. Open the customer's record in your store admin. On Shopify, go to Customers (opens in your Shopify admin in a new tab) and open the customer.
  2. In the Credit Limit and Account Balance metafield, paste the value from the form, for example {"credit_limit":1000,"balance":250}.
  3. If you sell in several currencies (see Shopify Markets and currencies), add the customer's currency, for example {"credit_limit":1000,"currency_code":"usd","balance":250}.
  4. Save the customer.

Lots of customers? Fill them in one tableShopify

In your Shopify admin, go to Customers, tick the customers and click Edit customers. Click Columns, tick Credit Limit and Account Balance under Metafields, then type the values (one row per customer) and click Save. Shopify's guide

The balance updates automatically with each successful order, and you can change it by hand at any time. For a balance that also tracks payments, turn on Payments visibility: see Show a real-time account balance.

WhereWhat the customer sees
My AccountIn Financials, for example, "Your account balance is £250.00 with a credit limit of £1,000.00", then "Payments may take some time to be updated. Please contact us to discuss payments or credit."
CheckoutIf the cart would exceed their available credit, "Your order currently exceeds your available credit limit". By default, Pay on Account is turned off and they must choose another method, such as Pay Online by Card.
Check a customer's credit details in SparkLayer

Open the customer at Customers (opens in your SparkLayer Dashboard in a new tab). Under Financial details, Payment on account shows their Balance, Credit limit, Net terms and Currency. These come from the metafield, so change them on the customer's record in your store admin.

Worked example

Available credit is the customer's credit_limit minus their balance. The balance is what they owe you, not what they have left to spend.

What happensMetafield valueAvailable credit
You give a new customer $250 to spend{"credit_limit":250,"balance":0}$250.00
They place a $77.80 order with Pay on AccountSparkLayer updates the balance to 77.80$172.20
They try to pay on account for a $200.00 orderNo change$172.20, so checkout is blocked for Pay on Account

Don't set balance to 250 to give them $250 to spend. {"credit_limit":250,"balance":250} means they already owe you $250, so they've used all their credit.

Checkout blocks the order, rather than warning the customer, because of the customer group's Prevent placing an order if exceeding credit limit setting, shown on the group as Checkout blocked if limit exceeded. See Block orders over the credit limit.

Let customers order over their credit limit

By default, a customer can't pay on account for an order over their credit limit. To allow it, change the customer group's Credit settings rule:

  1. Go to Customers,Groups (opens in your SparkLayer Dashboard in a new tab) and click the group's name. For every group, click Edit on the base customer group.
  2. Under Inherited rules, click + Override next to Credit settings (on the base group, + Customize), then Configure.
  3. Turn off Prevent placing an order if exceeding credit limit, then click Save.

Customers can then pay on account over their limit, with a message that the order may be delayed and subject to approval. See Block orders over the credit limit.

There's also a store-wide setting at Settings,Configurations (opens in your SparkLayer Dashboard in a new tab) that lets customers use Pay on Account when an order takes them over their limit.

Change the credit messages

Change this text without code at Storefront,Options,Translation overrides (opens in your SparkLayer Dashboard in a new tab) (see Change checkout text). {balance}, {creditLimit} and {type} are replaced with the customer's own values.

KeyDefault text
account.main.my-details.payment-on-account.detailYour account balance is {balance} with a credit limit of {creditLimit}.
account.main.my-details.payment-on-account.detail-without-limitYour account balance is {balance}.
account.main.my-details.payment-on-account.net-termsYour payment terms are {type}.
account.main.my-details.payment-on-account.sub-textPayments may take some time to be updated. Please contact us to discuss payments or credit.
cart.checkout.payment-method.credit-unavailable.titleYour cart currently exceeds your available credit limit
cart.checkout.payment-method.credit-unavailable.messagePlease choose an alternative payment method to complete your order. If you'd like to discuss your payment terms, please contact us.
cart.checkout.payment-method.credit-limit-hit.titleYour cart currently exceeds your available credit limit
cart.checkout.payment-method.credit-limit-hit.messageYou can place an order but it may be delayed and subject to approval. If you'd like to discuss your payment terms, please contact us.

credit-unavailable messages show when Pay on Account is turned off for an order over the limit. credit-limit-hit messages show when you let customers order over it.

Core Script code for your developer

A developer can set the same text in your Core Script:

Core Script
translations: {
  en: {
    "account.main.my-details.payment-on-account.detail": "Your account balance is {balance} with a credit limit of {creditLimit}.",
    "account.main.my-details.payment-on-account.detail-without-limit": "Your account balance is {balance}.",
    "account.main.my-details.payment-on-account.net-terms": "Your payment terms are {type}.",
    "account.main.my-details.payment-on-account.sub-text": "Payments may take some time to be updated. Please contact us to discuss payments or credit.",

    "cart.checkout.payment-method.credit-unavailable.title": "Your cart currently exceeds your available credit limit",
    "cart.checkout.payment-method.credit-unavailable.message": "Please choose an alternative payment method to complete your order. If you'd like to discuss your payment terms, please contact us.",
    "cart.checkout.payment-method.credit-limit-hit.title": "Your cart currently exceeds your available credit limit",        
    "cart.checkout.payment-method.credit-limit-hit.message": "You can place an order but it may be delayed and subject to approval. If you'd like to discuss your payment terms, please contact us.",
  }
},

Set net payment terms

Net terms tell the customer how many days they have to pay an order they didn't pay for at checkout, such as Net 30. They show as Payment terms (for example, "45 days") in Financials in My Account.

  1. Open the customer's group at Customers,Groups (opens in your SparkLayer Dashboard in a new tab) and tick Payment on account (or Pay by invoice) in its Payment methods rule. See Payment methods.
  2. On the customer's record, add the terms to the payment on account metafield, for example {"net_terms":"30_days"}. Use the form to combine them with a credit limit: it writes {"credit_limit":1000,"balance":250,"net_terms":"30_days"} for you.

The customer uses their terms by choosing Pay on Account (or Pay by Invoice) at checkout. Supported values:

Net termsValue
7 days7_days
15 days15_days
30 days30_days
45 days45_days
60 days60_days
90 days90_days

Pay on Account orders arrive in Shopify as draft orders. SparkLayer ticks Payment due later and fills in Payment terms (such as "Within 30 days") and Issue date, so Shopify shows the due date, such as "Payment due on 19 June 2023 (Net 30)".

To complete these drafts automatically and collect payment later (for example, through your accounting system), turn on Auto-complete draft orders at Integrations,Platform,Shopify order actions (opens in your SparkLayer Dashboard in a new tab).

To mark net terms orders as paid automatically, and automate more of the process, use our ready-made Shopify Flows.

Choose how to send invoices

MethodHow it worksBest when
SparkLayer Invoices (Growth and above)A PDF invoice is created for each order, and customers view and download it from My Account.Your needs are fairly simple and you don't want another app. See Invoices.
Send invoices from your storeYou send invoices from your eCommerce platform's admin.Your needs are basic, or you're testing a B2B invoicing process. See Send invoices from your store.
Attach your own invoiceA metafield links an invoice file to the order, added by hand or automatically.Another system, such as your ERP or accounting software, already creates invoice files such as PDFs. See Attach your own invoice.
Third-party appApps such as Sufio integrate with SparkLayer.You also invoice retail customers, or want more design control. See Use a third-party invoicing app.

Shopify only

To see how each way of invoicing works with Auto-complete draft orders, and with Xero or QuickBooks Online, try the interactive guide How payments work.

Send invoices from your store

Orders with an offline payment method, such as Pay by Invoice, can arrive in Shopify as draft orders. Shopify's Send invoice emails the customer a message and a link to the Shopify checkout.

  1. In the Shopify admin, open the draft order.
  2. Send the invoice. The customer gets an email with a Complete your purchase button and an order summary.
  3. When the customer pays, the order is marked as paid and moves to your Shopify Orders.

Until then, the order stays a draft. If the customer hasn't paid, open the draft and click Resend invoice. If you're taking payment another way, use Collect payment to mark it as paid.

To change the email, edit the Draft order invoice template at Settings,Notifications (opens in your Shopify admin in a new tab). See Shopify's guide to sharing a checkout link with customers (opens in a new tab).

Attach your own invoice to an order

Link an invoice file to an order, and customers see View & Download Invoice on that order in My Account. Put a UUID (opens in a new tab) in the file name or URL so no one can guess it.

  1. Add an order metafield in Shopify (see Shopify metafields and data mapping):

    ItemValue
    Custom data typeOrders (opens in a new tab)
    Metafield typeURL or File. One value or a list of values are both supported.
    Namespacesparklayer
    Keyinvoice_url
  2. If your invoice isn't hosted anywhere yet, upload it to Shopify Files (opens in a new tab) and click the Copy link icon next to it.

  3. Open the order in Shopify. In Metafields, paste the link into the invoice URL field (for example, B2B Invoice URL) and save.

As this is a Shopify metafield, you can attach invoices in bulk, or automatically from a backend system such as an ERP or CRM.

Use a third-party invoicing app

For more invoicing features, consider an app such as Sufio Invoicing.

Troubleshooting

FAQs

Was this page helpful?

Last updated