Getting started
Getting started
Create API keys, authenticate Integration requests, and make your first call to the Doggie Pay API.
Getting started
This guide gets your server talking to the Doggie Pay Integration API. By the end you will:
- Choose the right product rail (Checkout vs Customers)
- Create API keys and understand auth headers
- Call a read endpoint successfully
Base URL
https://api.doggiepay.com
All merchant Integration paths are under /v1/* (not /v1/portal/* and not /ops/*).
1. Choose your product rail
| Rail | Use when | Primary objects | Typical webhooks |
|---|---|---|---|
| Checkout | One-off order / invoice payment | Checkout Session (= Payment) | checkout.paid, checkout.expired, checkout.cancelled |
| Customers | In-app user deposits & withdrawals | Customer, long-lived wallets | deposit.credited, withdrawal.* |
- Checkout → next guide: Accept a payment
- Customers → dedicated guides (create customer, deposits, withdrawals)
- Both rails share auth, Request-Id, and Webhooks
Doggie Pay credits your merchant crypto balance. End-user balances (if any) live in your system.
2. Prerequisites
- Create a merchant at merchant.doggiepay.com
- In the portal, create a Secret key (
dp_live_sk_…) — store only on your server (env / KMS) - Optionally create a Publishable key (
dp_live_pk_…) for browser-safe allowlisted calls - Configure a Webhook URL and save the one-time
webhook_secret(whsec_…) — see Webhooks
Never put a Secret key in a mobile app, SPA, or public repo.
3. Authentication
Credentials
| Credential | Format | Where | Purpose |
|---|---|---|---|
| Secret key | Bearer dp_live_sk_… | Server only | Default Integration auth; writes & sensitive reads |
| Publishable key | Bearer dp_live_pk_… | Server or browser (allowlist) | Limited surfaces (see below) |
| Portal JWT | Google session | merchant-web only | /v1/portal/* — not for Integration |
Publishable key allowlist
| Method | Path |
|---|---|
GET | /v1/merchant/me |
GET | /v1/chains |
GET | /v1/tokens |
GET | /v1/wallets/{external_user_id} |
POST | /v1/checkout/sessions |
All other Integration routes require a Secret key.
Required headers (Integration)
Authorization: Bearer dp_live_sk_YOUR_SECRET
X-DoggiePay-Request-Id: 550e8400-e29b-41d4-a716-446655440000
Content-Type: application/json
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer + Secret or Publishable key |
X-DoggiePay-Request-Id | Yes | UUID v4. Echoed on the response. |
Idempotency-Key | Recommended on writes | Preferred idempotency key; if omitted, Request-Id is used |
Content-Type | On JSON bodies | application/json |
Idempotency: On create/update, retries after timeouts should reuse the same Request-Id (or Idempotency-Key) and the same body. A replay with a different body returns 409 request_id_conflict.
4. Response envelope
Success:
{
"data": { },
"error": null
}
Error:
{
"data": null,
"error": {
"code": "unauthorized",
"message": "Bearer token required"
}
}
| Field | Type | Description |
|---|---|---|
data | object | array | null | Payload on success |
error | object | null | Present on failure |
error.code | string | Stable machine code |
error.message | string | Human-readable detail |
5. Your first request
List enabled chain aliases (Secret or Publishable):
curl -sS https://api.doggiepay.com/v1/chains \
-H "Authorization: Bearer dp_live_sk_YOUR_SECRET" \
-H "X-DoggiePay-Request-Id: $(uuidgen | tr '[:upper:]' '[:lower:]')"
Example data:
{
"chains": ["ETH", "BASE"]
}
List tokens (optional ?currency=USDC):
curl -sS "https://api.doggiepay.com/v1/tokens?currency=USDC" \
-H "Authorization: Bearer dp_live_sk_YOUR_SECRET" \
-H "X-DoggiePay-Request-Id: $(uuidgen | tr '[:upper:]' '[:lower:]')"
6. Common error codes
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing/invalid Bearer |
| 401 | portal_token_not_allowed | Portal JWT used on Integration |
| 403 | secret_key_required | Publishable used where Secret is required |
| 403 | merchant_disabled | Merchant disabled |
| 400 | request_id_required | Missing X-DoggiePay-Request-Id |
| 400 | invalid_request_id | Request-Id is not a UUID |
| 409 | request_id_conflict | Same Request-Id, different body |
7. Next steps
- Accept a payment with Checkout — create a session and open Hosted Checkout
- Webhooks — verify signatures and mark the order paid on
checkout.paid - Install
@doggiepay/checkoutwhen you embed a pay button in your frontend
Hosts
| Host | Role |
|---|---|
https://api.doggiepay.com | REST API |
https://merchant.doggiepay.com | Merchant portal (keys, webhook, balances) |
https://pay.doggiepay.com | Hosted Checkout / claim pages |
