Hygglig BNPL

Buy now, pay later checkout

Use the BNPL PaymentIntegration API to start, retrieve, update, and cancel BNPL checkouts in the sandbox.

Check payment plansGET payment plans for
the scaled amount
Start checkoutPOST payment request,
receive html_snippet
Render iframeEmbed html_snippet on your
checkout page
Manage checkoutGET, PUT, or cancel by
order_number
1

Use your sandbox credentials

The same Merchant ID and Secret work for both Hygglig Checkout and Hygglig BNPL. Send them with Basic authentication when calling the BNPL PaymentIntegration API.

Open Hygglig.BNPL.PaymentIntegration documentation
2

Get available payment plans

For instalment purchases, request payment plans with GET /api/payment-plans/{amount}. The API divides the supplied amount by 100 and accepts totals from 5,000 to 30,000.

const creds = btoa(`${merchantId}:${secret}`); 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.

3

Start and render the BNPL checkout

Create the checkout with POST /api/payment. The response returns a checkout model with html_snippet, which you render on your 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(); document.getElementById('checkout').innerHTML = html_snippet;
4

Retrieve, update, or cancel by order number

Use GET /api/payment/{order_number} to retrieve the BNPL checkout, PUT /api/payment/{order_number} to update it, and PATCH /api/payment/{order_number}/status to cancel it.

For EPP purchases, the update flow validates that the selected tenure and payment plan still match the updated article amount.

Need the full contract?

Open the BNPL PaymentIntegration API docs for request fields, response fields, status codes, and scaling rules.

View API documentation