Credit limits and net terms
How it works
Set terms on the customer
Customer sees them
Customer pays on account
Order arrives with terms
You invoice and collect
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.
Shopify only
On Shopify, SparkLayer can add it for you: go to Integrations,Platform (opens in your SparkLayer Dashboard in a new tab) and, in the Metafields card, click Configure next to SparkLayer metafields. See Shopify metafields and data mapping.
For other platforms, see the developer docs.
Metafield details, for adding it by hand
| Item | Value |
|---|---|
| Custom data type | Customers. On Shopify, see customer metafields (opens in a new tab). |
| Metafield type | JSON |
| Namespace | sparklayer |
| Key | payment_on_account |
| Value | Set 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:
| Property | What it does | Example |
|---|---|---|
credit_limit | The most the customer can owe you. | 1000 |
balance | What the customer owes you now. | 250 |
currency_code | The currency to show the limit and balance in, if you sell in more than one. | usd |
net_terms | The customer's payment terms. See supported values. | 30_days |
balance_date | The 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.
sparklayer.payment_on_accountAdd 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 customer | Enter |
|---|---|
| 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
- 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.
- In the Credit Limit and Account Balance metafield, paste the value from the form, for example
{"credit_limit":1000,"balance":250}. - 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}. - 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.
| Where | What the customer sees |
|---|---|
| My Account | In 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." |
| Checkout | If 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 happens | Metafield value | Available 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 Account | SparkLayer updates the balance to 77.80 | $172.20 |
| They try to pay on account for a $200.00 order | No 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:
- 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.
- Under Inherited rules, click + Override next to Credit settings (on the base group, + Customize), then Configure.
- 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.
| Key | Default text |
|---|---|
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. |
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:
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.",
}
},<!-- SparkLayer Core Script: in your theme, just before </head>.
Already have window.sparkOptions? Add just the setting to it. -->
<script>
window.sparkOptions = {
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.",
}
},
};
</script>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.
- 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.
- 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 terms | Value |
|---|---|
| 7 days | 7_days |
| 15 days | 15_days |
| 30 days | 30_days |
| 45 days | 45_days |
| 60 days | 60_days |
| 90 days | 90_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.
For how net terms orders are created on your platform, see the developer docs.
Choose how to send invoices
| Method | How it works | Best 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 store | You 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 invoice | A 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 app | Apps 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.
- In the Shopify admin, open the draft order.
- Send the invoice. The customer gets an email with a Complete your purchase button and an order summary.
- 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).
See the developer docs.
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.
-
Add an order metafield in Shopify (see Shopify metafields and data mapping):
Item Value Custom data type Orders (opens in a new tab) Metafield type URLorFile. One value or a list of values are both supported.Namespace sparklayerKey invoice_url -
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.
-
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.
| Item | Value |
|---|---|
| Custom data type | Orders |
| Metafield type | A text string. Use secure, unguessable file names, for example with a UUID generator (opens in a new tab). |
| Namespace | sparklayer |
| Key | invoice_url |
| Value | N/A |
For more information, see the developer docs.
Use a third-party invoicing app
For more invoicing features, consider an app such as Sufio Invoicing.
Troubleshooting
FAQs
By default, Pay on Account is turned off for that order, and a message asks them to choose another method. To let them order over their limit, see Let customers order over their credit limit.
Check the metafield's balance. It's what the customer owes you, so a balance equal to the credit limit leaves them nothing to spend. To give them $250 to spend, enter {"credit_limit":250,"balance":0}. See Worked example.
The customer group's Prevent placing an order if exceeding credit limit setting is on, which is the default. Turn it off to let customers place the order with a warning instead. See Let customers order over their credit limit.
Shopify only
Pay on Account orders arrive in Shopify as draft orders with payment due later. SparkLayer doesn't take the payment. Collect it your usual way, such as by bank transfer, then mark the order as paid in Shopify. See Complete a draft order by hand.
No. Each order has one payment method, so a customer can't split an order between their credit and a card.
Shopify only
Shopify gift cards only work in Shopify's own checkout, when the customer chooses Pay Online by Card. They can't be used with Pay on Account. SparkLayer isn't a store credit system: the credit limit is how much a customer can owe you, not a balance they've paid in advance. See Which payment methods work with the SparkLayer checkout?
Not in SparkLayer: net terms orders arrive with Shopify's payment terms and a due date, and stay unpaid until you collect payment. Use Shopify Flow instead. See Set net payment terms.
Yes, with Payments visibility (Shopify only). See Show a real-time account balance.
Last updated