Hygglig BNPL

BNPL PaymentIntegration API

Retrieve payment plans, start a BNPL checkout, render the returned html_snippet, and manage the checkout by order_number.

Get payment plansGET /api/payment-plans/{amount}
before EPP checkout
Start BNPL checkoutPOST /api/payment,
receive html_snippet
Update checkoutPUT /api/payment/{order_number}
before completion
Cancel checkoutPATCH /api/payment/{order_number}/status
by order_number
1

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.

2

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();
3

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.

4

Cancel checkout

Use PATCH /api/payment/{order_number}/status to cancel a BNPL checkout by order number.

5

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.

View API documentation