Skip to main content

B2B Commerce APIs

Manage orders, subscriptions, storefront access, and price drops for B2B e-commerce.

Features Overview​

Orders & Quotes​

Create B2B orders with flexible payment terms:

Payment TermDescriptionMax Duration
Net 30Standard payment30 days
Net 60Extended terms60 days
Installments 66 monthly payments6 months
Installments 1212 monthly payments12 months
Installments 2424 monthly payments24 months

Subscriptions​

Subscription pricing is dynamically calculated based on customer credit:

Credit Score → Recommended Terms → Monthly Amount
  • Excellent (750+): Best rates, 24-month terms
  • Good (700-749): Competitive rates, 24-month terms
  • Fair (650-699): Standard rates, 12-month terms
  • Poor (600-649): Higher rates, 6-month terms

Quick Start​

from huntrecht import HuntrechtClient

client = HuntrechtClient(
client_id="hnt_your_client_id",
client_secret="your_secret"
)

# Create order with payment terms
order = client.orders.create({
"customer_id": "cust_abc123",
"line_items": [{"product_id": "prod_001", "quantity": 10}],
"payment_terms": "net_30"
})

# Create subscription with installments
subscription = client.subscriptions.create({
"customer_id": "cust_abc123",
"product_id": "prod_subscription_001",
"installments": 12
})

Integration with Shopify​

All orders and subscriptions automatically sync with Shopify:

  • Draft Orders: Created automatically for subscriptions
  • Customers: Synced with Shopify B2B Company
  • Payment Terms: Set in Shopify for each order
  • Fulfillment: Managed through Shopify

API Reference​