Avarda Checkout Adapter
Overview Document: Payment Adapters Overview
Overview and Unique Capabilities
The Avarda Checkout Adapter integrates Avarda Checkout 3.0 with Norce Checkout. This page focuses on the unique technical details and configuration for Avarda.
Supported payment methods and other features: Features Overview
Supported Languages
English, Swedish, Finnish, Norwegian, Estonian, Danish, Czech, Latvian, Slovak, Polish, German, Austrian, Russian
B2B and B2C Support
The adapter supports both B2C (person) and B2B (organization) checkout modes. For B2C, customers are identified by their national identification number (social security number). For B2B, customers are identified by their organization identification number. The mode is determined automatically based on the customer type on the Norce order, or can be overridden via the mode configuration option.
Limitations
- Partial Capture is not supported (full order capture only).
- Partial Refund is not supported (full refund only).
- Preselected payment method is not applicable for Sweden market.
Configuration in Norce Admin
The adapter is configured using the following unique details obtained from Avarda:
API Settings
| Field | Description | Example Value |
|---|---|---|
apiUrl | Avarda Checkout API URL. | https://stage.checkout-api.avarda.com |
javascriptUrl | URL to Avarda Checkout embed script. | https://stage.checkout-cdn.avarda.com/cdn/static/js/main.js |
clientId | Your Avarda client identifier. | abc123 |
clientSecret | Your Avarda client secret key. | xyz789 |
useShippingBroker | Enable Avarda's integrated shipping broker. | true |
Checkout Setup Options
| Field | Description |
|---|---|
selectedPaymentMethodType | Preselected payment method (not applicable for Sweden market). |
recurringPayments | Enable recurring payments checkbox (Hidden, Checked, Unchecked). |
emailInvoice | Enable email invoice checkbox (Hidden, Checked, Unchecked). |
language | Override checkout form language (default: based on order culture). |
mode | Purchase mode (B2C or B2B). Default: determined by customer type. |
displayItems | Show item list inside checkout form (default: true). |
differentDeliveryAddress | Delivery address checkbox setup (Hidden, Checked, Unchecked). |
termsAndConditionsUrl | Custom T&C link (overrides Partner onboarding setting). |
integrityConditionsUrl | Custom integrity/privacy policy link. |
enableB2BLink | Enable or disable B2B link visibility (default: false). |
enableCountrySelector | Enable or disable country selector (default: false). |
showThankYouPage | Show or hide thank you page (default: false). |
ageValidation | Minimum customer age requirement (integer). |
hideUnsupportedRecurringPaymentMethods | Hide payment methods that don't support recurring (default: true). |
skipEmailZipEntry | Skip email and zip code entry step. |
invoicingCountries | List of invoicing countries for country selector. |
deliveryCountries | List of delivery countries for country selector. |
Styling Options
Custom CSS styling can be configured via the styles object to override Avarda Checkout's default appearance. The styles are passed through to the Avarda Checkout iframe.
Consent Options
| Field | Description |
|---|---|
emailNewsletterSubscriptionConsentId | Consent ID for email newsletter subscription. |
smsNewsletterSubscriptionConsentId | Consent ID for SMS newsletter subscription. |
Avarda API Environments
In addition to the generic Norce Adapter URLs (see Payment Adapters Overview), Avarda uses the following external API environments:
| Environment | Avarda API Base URL |
|---|---|
| Production | https://checkout-api.avarda.com |
| Stage | https://stage.checkout-api.avarda.com |
Embedding the Checkout
Use the purchaseJwt and javascriptUrl returned from the create payment endpoint:
{
"paymentId": "pfloMHwnSFxLDtaQYTVSeSKaLBx",
"purchaseJwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"javascriptUrl": "https://stage.checkout-cdn.avarda.com/cdn/static/js/main.js",
"styles": {}
}The Avarda Checkout is embedded as an iframe using the JavaScript SDK. Load the script from javascriptUrl and initialize the checkout with the purchaseJwt token. The checkout iframe handles the complete payment flow including customer identification, payment method selection, and order confirmation.
Client-Side Event Callbacks
The Avarda Checkout JavaScript SDK provides several callbacks that your storefront should handle:
| Callback | Description | Action Required |
|---|---|---|
beforeSubmit | Triggered when customer clicks "Complete Payment" | Call validate then process endpoints |
completedPurchase | Triggered when payment is completed in Avarda | Call notification endpoint |
customerUpdate | Triggered when customer updates billing/shipping | Call customer-update endpoint |
shippingOptionUpdate | Triggered when shipping option changes | Call shipping-option-update endpoint |
Validation and Process Flow
Implement a two-step validation flow when the customer clicks "Complete Payment":
Step 1: Validate
POST /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/validate
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}Step 2: Process (if validation succeeds)
POST /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/process
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}The process endpoint checks that the order has not changed since validation, updates consents, billing and shipping address, and transitions the Norce order and payment state.
Confirmation Page
After successful payment completion, Avarda can display a thank you page within the checkout iframe if showThankYouPage is enabled. Alternatively, redirect the customer to your own confirmation page. The payment details can be retrieved using the GET payment endpoint to display order confirmation information.
Troubleshooting (Avarda Specific)
In addition to the generic troubleshooting steps:
- Review the order status in Avarda's admin portal.
- Check that the Avarda order has been fully processed (
ProcessedBackEnd: true). - Use the refresh endpoint to update available payment actions:
POST /api/order/v1/orders/{order_id}/payments/{payment_id}/refresh
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}Common Errors
- 409 Conflict: A payment already exists for this order.
- avarda-order-expired: Checkout session expired, create new payment.
- Capture Fails: Order must be in
reservedstate andCompletedin Avarda.
Payment States
| State | Description |
|---|---|
intent | Payment initialized, checkout session created |
pending | Payment awaiting final confirmation |
reserved | Payment completed, ready for capture |
captured | Payment captured/delivered |
cancelled | Payment cancelled |
declined | Payment declined by Avarda |