Skip to main content

Integrating account onboarding

Account onboarding uses the regular Walley Checkout integration. The differences are a profile set up by Walley, a session without a cart, and a new end status, AgreementRegistered.

Overview​

1. Get a profile from Walley​

Walley configures account onboarding in a settings profile for your store. Send the following to your Walley representative:

InformationDescription
Store id(s) and marketsSweden, Finland or both. One profile per market.
VariantWith Loyal Pay or without. See Variants.
Purchase limitFixed, or selectable with a default and a maximum. Values from the limit scale.
Account name and descriptionThe name shown to the customer, for example ABC Account, per language.
IconA square logo for the account.
Credit terms URLOnly without Loyal Pay. A public URL to your credit terms, per language.
Loyalty programWith Loyal Pay: a working Loyalty Booster setup.
Raise of existing limitsWhether existing account holders may raise their limit in the flow.

You get a profile name back, for example AccountOnboarding.

2. Initialize a session​

Call Initialize Checkout with the profile name and without a cart.

POST /checkouts HTTP/1.1
Host: api.uat.walleydev.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
"storeId": 123,
"countryCode": "SE",
"profileName": "AccountOnboarding",
"merchantTermsUri": "https://example.com/terms",
"notificationUri": "https://example.com/notifications"
}

The response is the same as for a purchase and contains a privateId and a publicToken. Use the publicToken to render the checkout on your sign-up page. Keep the privateId on your backend to read the result.

No cart, fees or upsell

Omit cart, fees and upsell items. The session registers an account and creates no order.

Validation errors:

ReasonCause
Cart_Articles_Not_AllowedThe request contains cart items.
Fees_Not_AllowedThe request contains fees.
Upsell_Items_Not_AllowedThe request contains upsell items.
Invalid_Configuration (HTTP 500)The profile is not valid for the market or customer type. Contact Walley.

3. Render the checkout​

Render the checkout exactly as for a purchase. The checkout shows identification, membership and the account. There is no cart, delivery or total amount, and the button reads Sign. See the customer journey.

4. Handle the result​

In the browser​

When the customer has signed, the checkout fires the client event walleyCheckoutPurchaseCompleted. The customer is not redirected. The checkout shows a confirmation with the granted purchase limit.

Show your own next step next to the checkout, for example a link to your store or app.

On your backend​

Walley calls your notificationUri when the account is registered. Then call Get Checkout Information and check data.status.

{
"data": {
"customerType": "PrivateCustomer",
"countryCode": "SE",
"status": "AgreementRegistered",
"customer": {
"email": "test@example.com",
"mobilePhoneNumber": "+46701234567",
"nationalIdentificationNumber": "19510731-2323",
"loyaltyMembership": {
"provider": "voyado",
"success": true,
"isMember": "new",
"memberNumber": "123456"
}
},
"cart": null,
"purchase": null,
"order": null
}
}
FieldDescription
data.statusAgreementRegistered when the account is registered, raised, or already existed.
data.customerThe identified customer, including loyaltyMembership if the customer joined your loyalty program in the flow.
data.cart, data.purchase, data.orderAlways null. No order is created.
Purchase limit

The response does not include the granted purchase limit. The customer sees it in the confirmation in the checkout.

If the application is denied​

The session stays open. The customer sees a message and can try a lower limit, or leave. The checkout fires walleyCheckoutPaymentAborted, and data.status does not become AgreementRegistered. A limit the customer already had is kept.

Testing​

Use the test data for Swedish and Finnish private customers in UAT. Test at least:

  • a new customer who gets the account
  • a customer who already has the account
  • with Loyal Pay: a customer who is not a member and joins in the flow
  • a denied application