Hygglig BNPL
BNPL PaymentIntegration API
Retrieve payment plans, start a BNPL checkout, render the returned html_snippet, and manage the checkout by order_number.
before EPP checkout
receive html_snippet
before completion
by order_number
Get eligible payment plans
Use GET /api/payment-plans/{amount} to retrieve eligible BNPL instalment payment plans. The API divides the supplied amount by 100 and accepts totals from 5,000 to 30,000.
const plans = await fetch('https://sb-checkout.hygglig.com/api/payment-plans/500000', { headers: { 'Authorization': `Basic ${creds}` } });
500000 represents 5,000 after the API scales the amount down by 100.
Start BNPL checkout
Use POST /api/payment to create a BNPL checkout. The response contains a checkout model with html_snippet, which is rendered in the merchant checkout page.
const checkout = await fetch('https://sb-checkout.hygglig.com/api/payment', { method: 'POST', headers: { 'Authorization': `Basic ${creds}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ order_reference, country_code, currency, purchase_info, articles, shipping_info, checkout_url, success_url, cancel_url, push_notification_url, terms_url }) }); const { html_snippet } = await checkout.json();
Retrieve or update by order number
Use GET /api/payment/{order_number} to retrieve a BNPL checkout and PUT /api/payment/{order_number} to update it. For EPP purchases, the update flow validates the selected tenure and payment plan against the updated article amount.
Cancel checkout
Use PATCH /api/payment/{order_number}/status to cancel a BNPL checkout by order number.
Important data rules
The BNPL PaymentIntegration contract uses Basic authentication with the sandbox Merchant ID and Secret. Article price, quantity, vat, tenure, and payment-plan amount values are scaled by 100 in the API contract.
Need schemas and status codes?
Open the full Hygglig.BNPL.PaymentIntegration documentation for request fields, response fields, examples, and error cases.