Installments Block Function
Disables Shop Pay Installments at checkout if the customer is tagged B2B or if the cart total exceeds $5,000.
I'd use a Payment Customization Function to enforce the rule at checkout, then layer in a disclosure badge so customers understand why installments aren't available. To keep the system clean, I'd add Shopify Flow to auto-tag incoming B2B customers, and finally expose a simple dashboard query so the merchant can audit their rules and catch edge cases.
Disables Shop Pay Installments at checkout if the customer is tagged B2B or if the cart total exceeds $5,000.
Shows a small message at checkout if Shop Pay Installments is disabled, so B2B or high-value buyers understand why the option is unavailable.
{% if customer and customer.tags contains 'b2b' %}
<div style="padding: 12px; margin: 12px 0; border-left: 3px solid #999; background: #f9f9f9; font-size: 13px; color: #666;">
<strong>B2B Account:</strong> Installment payment options are not available for wholesale orders.
</div>
{% elsif cart.total_price > 500000 %}
<div style="padding: 12px; margin: 12px 0; border-left: 3px solid #999; background: #f9f9f9; font-size: 13px; color: #666;">
<strong>Large Order:</strong> Installment payment options are not available for orders over $5,000.
</div>
{% endif %}
Automatically tags new wholesale customers with 'b2b' when they create an account through your B2B portal or when manually marked by staff.
Trigger: Customer created OR Customer updated (via B2B portal signup)
Condition: customer.note contains "wholesale" OR customer has metafield company_id (indicates B2B)
Action 1: Add tag "b2b" to customer
Action 2: Send confirmation email to merchant (optional: notify fulfillment that this is a wholesale order)
A simple reference showing all customers tagged 'b2b' and flagging recent high-value orders, so you can spot rule mismatches or edge cases.
# Admin GraphQL — fetch B2B customers and their order history
query B2BCustomerReport {
customers(first: 50, query: "tag:b2b") {
edges {
node {
id
firstName
lastName
email
tags
orders(first: 3, sortKey: CREATED_AT, reverse: true) {
edges {
node {
id
name
totalPriceSet {
shopMoney {
amount
}
}
createdAt
}
}
}
}
}
}
}
Sketch your build in 30 seconds — voice, type, or attach a screenshot.
Sketch the build →