Skip to main content

Setup Merchant

This describes the request used to create or update a Merchant and add stores to that merchant

Example​

POST /manage/onboarding HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...

{
"Merchant": {
"Name": "Selling Company Group",
"OrganizationNumber": "9912139814",
"VatRegistrationCode": "SE991213981401",
"CountryCode": "SE",
"ContactInformation": {
"Name": "John Doe",
"Address": {
"AddressLine1": "Street address 11",
"City": "Gothenburg",
"PostalCode": "41103",
"CountryCode": "SE"
},
"Phone": "+46730000111",
"Email": "contact@sellingcompanygroup.com",
"WebsiteUrl": "https://sellingcompanygroup.com"
},
"InvoiceInformation": {
"Address": {
"AddressLine1": "Street address",
"City": "Gothenburg",
"PostalCode": "41103",
"CountryCode": "SE"
},
"Email": "invoice@sellingcompanygroup.com"
}
},
"Stores": [
{
"Template": "Checkout",
"SalesSegment": "B2C",
"CountryCode": "SE",
"OrganizationNumber": "9912139814",
"VatRegistrationCode": "SE9912139815",
"LegalName": "Selling Company AB",
"PresentationName": "sellingthings.se",
"SalesCategory": "Retail",
"LogoUrl": "https://cdn.walleypay.com/logo/walley-black.svg",
"ContactInformation": {
"Address": {
"AddressLine1": "StreetAddress 12",
"PostalCode": "41103",
"City": "Gothenburg",
"CountryCode": "SE"
},
"WebsiteUrl": "https://sellingthings.se",
"CustomerServicePhoneNumber": "+46123456789",
"CustomerServiceEmail": "hello@sellingthings.se"
}
},
{
"Template": "Checkout",
"SalesSegment": "B2B",
"CountryCode": "NO",
"OrganizationNumber": "9912139815",
"VatRegistrationCode": "SE9912139815",
"LegalName": "Selling Company AB",
"PresentationName": "sellingthings-to-retailers.no",
"SalesCategory": "Retail",
"LogoUrl": "https://cdn.walleypay.com/logo/walley-white.svg",
"ContactInformation": {
"Address": {
"AddressLine1": "StreetAddress 12",
"PostalCode": "1110",
"City": "Oslo",
"CountryCode": "NO"
},
"WebsiteUrl": "https://sellingthings-to-retailers.no",
"CustomerServicePhoneNumber": "+479123456789",
"CustomerServiceEmail": "hello@sellingthings-to-retailers.no"
}
}
]
}

Idempotency

Basically, given the same merchant OrganizationNumber and CountryCode code, stores provided in the request will be setup in addition to already existing stores. The information on existing stores and on the merchant will NOT be updated when you call this endpoint a second time.

Data Model​

Request​

Request headers​
HeaderRequiredExplanation
AuthorizationYesInstructions on how to generate the Bearer token value can be found here
Request body​
PropertyRequiredExplanation
MerchantYesThe Merchant is the selling company.
StoresYesArray of Store. Stores represent the selling point, e.g. B2C in SE, B2B in SE have two separate stores. One merchant can have several stores.
ApiSecretExpirationNoUsed to control how long the expiration time on the secret should be, allowed values SixMonths, OneYear, TwoYears, Unlimited. Default value is TwoYears.

Response​

The response is wrapped in a Response object containing data, links, results and metadata

PropertyExplanation
data.merchantIdThe MerchantId of the created or updated merchant in Walleys system
data.authentication.clientIdThe ClientId part of the authentication to be used by partner to act on behalf of the create or updated merchant. Used to obtain a token from the Authentication Service.
** Will only be returned for the first call for each merchant **
data.authentication.secretKeySecret key part of the authentication to be used by partner to act on behalf of the create or updated merchant. Used to obtain a token from the Authentication Service.
** Will only be returned for the first call for each merchant **
data.authentication.secretExpireThe datetime when the secret will expire.
results.idId of created store
results.salesSegmentSales segment of created store
results.countryCodeCountry code of created store
results.statusStatus code, similar to HttpStatusCodes.

200 OK - Store is created, everything is ok
409 Conflict - Store with this salessegment and countrycode already exists, store not created.
500 Error - Store not created due to an error
202 Accepted - Store is partially created. The store is ready for purchases, but walley needs to a manual adjustment (could be a problem with the logo provided, for example).

Validation​

ValidationExplanation
Required variablesAll mandatory properties must be present in the request
Organization numberOrganization number / Company registration number must be a valid format