kamiPay LogokamiPay Docs

Stores & Checkouts

Retrieve the stores and checkouts associated with your merchant account.

When creating a Static QR Code, you need to provide a valid store_id and checkout_id that belong to your merchant account. Use the endpoints below to discover them.


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 = "baseURL/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", access_token))

  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 Static QR.
store_namestringName of the store.
addressstringStore address.
phone_numberstringStore phone number.
emailstringStore email.

List Checkouts for a Store

GET /v2/stores/{store_id}/checkouts

Returns all checkouts for a given store, scoped to your merchant account. Returns 404 if the store doesn't exist or belongs to a different merchant.

Path Parameters

NameTypeDescription
store_idintegerRequired. The store ID to query checkouts for.

Example Request

const store_id = 1
const url = `baseURL/v2/stores/${store_id}/checkouts`

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

store_id = 1
url = f"baseURL/v2/stores/{store_id}/checkouts"

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

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

import (
  "fmt"
  "net/http"
)

func main() {
  store_id := 1
  url := fmt.Sprintf("baseURL/v2/stores/%d/checkouts", store_id)

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

  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,
    "checkout_id": 2,
    "checkout_desc": "Online checkout",
    "wallet_id": 3
  }
]
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "Store not found"
}
{
  "detail": "Internal Server Error"
}

Response Fields

FieldTypeDescription
merchant_idintegerYour merchant ID.
store_idintegerThe store this checkout belongs to.
checkout_idintegerCheckout identifier. Use this when creating a Static QR.
checkout_descstringDescription of the checkout.
wallet_idintegerWallet associated with this checkout. The Static QR address must match this wallet.

On this page