kamiPay LogokamiPay Docs
Account administration

Stores

List and create stores associated with your merchant account.

Each merchant can have multiple stores. A store_id is used when creating QR Codes to route the settlement to the correct wallet. Use the endpoints below to manage your stores.


List Stores

GET /v2/stores

Returns all stores associated with your merchant account.

Example Request

const url = `${baseURL}/v2/stores`

const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
  },
});
import requests

url = f"{base_url}/v2/stores"

headers = {
  "Authorization": f"Bearer {access_token}",
}

response = requests.get(url, headers=headers)
package main

import (
  "fmt"
  "net/http"
)

func main() {
  url := baseURL + "/v2/stores"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", accessToken))

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error making request:", err)
    return
  }
  defer resp.Body.Close()
}

Response

[
  {
    "merchant_id": 1,
    "store_id": 1,
    "store_name": "Main Store",
    "address": "Av. Paulista 1000",
    "phone_number": "+5511999999999",
    "email": "store@example.com"
  }
]
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "Internal Server Error"
}

Response Fields

FieldTypeDescription
merchant_idintegerYour merchant ID.
store_idintegerStore identifier. Use this when creating a QR Code.
store_namestringName of the store.
addressstringStore address.
phone_numberstringStore phone number.
emailstringStore email.

Create Store

POST /v2/stores

Creates a new store for the authenticated merchant. The store_id is assigned automatically and is scoped to your merchant account.

Body Parameters

NameTypeDescription
store_namestringRequired. Name of the store.
addressstringOptional. Store address.
phone_numberstringOptional. Store phone number.
emailstringOptional. Store email.

Example Request

const url = `${baseURL}/v2/stores`

const body = {
  store_name: "Downtown Branch",
  address: "Av. Paulista 1000",
  phone_number: "+5511999999999",
  email: "downtown@example.com",
}

const response = await fetch(url, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${access_token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});
import requests

url = f"{base_url}/v2/stores"

body = {
  "store_name": "Downtown Branch",
  "address": "Av. Paulista 1000",
  "phone_number": "+5511999999999",
  "email": "downtown@example.com",
}

headers = {
  "Authorization": f"Bearer {access_token}",
  "Content-Type": "application/json",
}

response = requests.post(url, json=body, headers=headers)
package main

import (
  "bytes"
  "encoding/json"
  "fmt"
  "net/http"
)

func main() {
  url := baseURL + "/v2/stores"

  body := map[string]interface{}{
    "store_name":   "Downtown Branch",
    "address":      "Av. Paulista 1000",
    "phone_number": "+5511999999999",
    "email":        "downtown@example.com",
  }

  requestBody, _ := json.Marshal(body)

  req, _ := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", accessToken))
  req.Header.Add("Content-Type", "application/json")

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error:", err)
    return
  }
  defer resp.Body.Close()
}

Response

{
  "merchant_id": 1,
  "store_id": 2,
  "store_name": "Downtown Branch",
  "address": "Av. Paulista 1000",
  "phone_number": "+5511999999999",
  "email": "downtown@example.com"
}
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "Internal Server Error"
}

Response Fields

FieldTypeDescription
merchant_idintegerYour merchant ID.
store_idintegerNewly assigned store identifier.
store_namestringName of the store.
addressstring | nullStore address.
phone_numberstring | nullStore phone number.
emailstring | nullStore email.

On this page