Skip to main content

Overview

Stores represent physical or online locations belonging to a merchant. When a merchant has multiple branches or POS locations, each one can be registered as a store. This lets you attribute payments to specific locations for reporting, and aligns with SKAT SAF-T compliance requirements. A default store is automatically created when a merchant first sets up their POS. Partners can create additional stores at any time via this API.

Create a Store

curl -X POST https://api.acountpay.com/v1/partner/merchants/42/stores \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Downtown Branch",
    "streetAddress": "Nørregade 12",
    "city": "København",
    "postalCode": "1165",
    "countryCode": "DK",
    "phone": "+4512345678",
    "email": "downtown@example.dk"
  }'

Request Body

FieldTypeRequiredDescription
namestringYesStore name
locationIdstringNoSKAT location identifier (auto-generated if omitted)
streetAddressstringNoStreet address
citystringNoCity
postalCodestringNoPostal code
countryCodestringNoTwo-letter country code (default: DK)
phonestringNoStore phone
emailstringNoStore email
isDefaultbooleanNoSet as default store for the merchant

Response

{
  "storeId": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
  "locationId": "LOC-20260319-A1B2",
  "name": "Downtown Branch",
  "streetAddress": "Nørregade 12",
  "city": "København",
  "postalCode": "1165",
  "countryCode": "DK",
  "phone": "+4512345678",
  "email": "downtown@example.dk",
  "isActive": true,
  "isDefault": false,
  "createdAt": "2026-03-19T10:00:00.000Z",
  "updatedAt": "2026-03-19T10:00:00.000Z"
}

List Stores

curl https://api.acountpay.com/v1/partner/merchants/42/stores \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret"

Response

{
  "stores": [
    {
      "storeId": "a1b2c3d4-...",
      "locationId": "LOC-20260101-MAIN",
      "name": "Main Store",
      "streetAddress": "Hovedgaden 1",
      "city": "København",
      "postalCode": "1000",
      "countryCode": "DK",
      "isActive": true,
      "isDefault": true,
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    },
    {
      "storeId": "e5f6a7b8-...",
      "locationId": "LOC-20260319-A1B2",
      "name": "Downtown Branch",
      "isActive": true,
      "isDefault": false
    }
  ],
  "total": 2
}

Get Store Details

curl https://api.acountpay.com/v1/partner/merchants/42/stores/a1b2c3d4-... \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret"

Update a Store

curl -X PUT https://api.acountpay.com/v1/partner/merchants/42/stores/a1b2c3d4-... \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Downtown Branch - Renovated",
    "phone": "+4598765432"
  }'
All fields are optional; only send the fields you want to change.

Deactivate a Store

curl -X DELETE https://api.acountpay.com/v1/partner/merchants/42/stores/a1b2c3d4-... \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret"
The default store cannot be deactivated. Set another store as default first by updating it with "isDefault": true.

Using Stores with Payments

Pass the storeId when creating a payment to attribute it to a specific store:
curl -X POST https://api.acountpay.com/v1/partner/payments \
  -H "X-Partner-Client-Id: your-client-id" \
  -H "X-Partner-Client-Secret: your-client-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantClientId": "merchant-uuid",
    "amount": 149.50,
    "referenceNumber": "ORDER-123",
    "storeId": "a1b2c3d4-...",
    "registerId": "REG-001"
  }'
The storeId and registerId are optional. If omitted, the payment is not attributed to a specific location. See the Payment Integration guide for the full create-payment reference.

API Quick Reference

OperationMethodEndpoint
Create storePOST/partner/merchants/:merchantId/stores
List storesGET/partner/merchants/:merchantId/stores
Get storeGET/partner/merchants/:merchantId/stores/:storeId
Update storePUT/partner/merchants/:merchantId/stores/:storeId
Deactivate storeDELETE/partner/merchants/:merchantId/stores/:storeId