Setup Merchant
This describes the request used to create or update a Merchant and add stores to that merchant
Example​
- Request
- Response
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"
}
}
]
}
{
"results": [
{
"id": 999998,
"salesSegment": "B2C",
"countryCode": "SE",
"status": 200
},
{
"salesSegment": "B2B",
"countryCode": "NO",
"status": 500
}
],
"data": {
"merchantId": "00000000-0000-0000-0000-000000000001",
"authentication": {
"clientId": "00000000-0000-0000-0000-000000000002",
"secretKey": "KKEuuKzybLH6WBUpHszV",
"secretExpire": "2024-02-25T09:03:13.8472589+00:00"
}
},
"links": {
"stores": {
"method": "GET",
"href": "/organizations/00000000-0000-0000-0000-000000000001/stores"
}
}
}
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​
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the Bearer token value can be found here |
Request body​
Property | Required | Explanation |
---|---|---|
Merchant | Yes | The Merchant is the selling company. |
Stores | Yes | Array 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. |
ApiSecretExpiration | No | Used 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
Property | Explanation |
---|---|
data.merchantId | The MerchantId of the created or updated merchant in Walleys system |
data.authentication.clientId | The 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.secretKey | Secret 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.secretExpire | The datetime when the secret will expire. |
results.id | Id of created store |
results.salesSegment | Sales segment of created store |
results.countryCode | Country code of created store |
results.status | Status 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​
Validation | Explanation |
---|---|
Required variables | All mandatory properties must be present in the request |
Organization number | Organization number / Company registration number must be a valid format |