← Back to API Docs

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:

  1. Choose the right product rail (Checkout vs Customers)
  2. Create API keys and understand auth headers
  3. 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

RailUse whenPrimary objectsTypical webhooks
CheckoutOne-off order / invoice paymentCheckout Session (= Payment)checkout.paid, checkout.expired, checkout.cancelled
CustomersIn-app user deposits & withdrawalsCustomer, long-lived walletsdeposit.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

  1. Create a merchant at merchant.doggiepay.com
  2. In the portal, create a Secret key (dp_live_sk_…) — store only on your server (env / KMS)
  3. Optionally create a Publishable key (dp_live_pk_…) for browser-safe allowlisted calls
  4. 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

CredentialFormatWherePurpose
Secret keyBearer dp_live_sk_…Server onlyDefault Integration auth; writes & sensitive reads
Publishable keyBearer dp_live_pk_…Server or browser (allowlist)Limited surfaces (see below)
Portal JWTGoogle sessionmerchant-web only/v1/portal/* — not for Integration

Publishable key allowlist

MethodPath
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
HeaderRequiredDescription
AuthorizationYesBearer + Secret or Publishable key
X-DoggiePay-Request-IdYesUUID v4. Echoed on the response.
Idempotency-KeyRecommended on writesPreferred idempotency key; if omitted, Request-Id is used
Content-TypeOn JSON bodiesapplication/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"
  }
}
FieldTypeDescription
dataobject | array | nullPayload on success
errorobject | nullPresent on failure
error.codestringStable machine code
error.messagestringHuman-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

HTTPerror.codeMeaning
401unauthorizedMissing/invalid Bearer
401portal_token_not_allowedPortal JWT used on Integration
403secret_key_requiredPublishable used where Secret is required
403merchant_disabledMerchant disabled
400request_id_requiredMissing X-DoggiePay-Request-Id
400invalid_request_idRequest-Id is not a UUID
409request_id_conflictSame Request-Id, different body

7. Next steps

  1. Accept a payment with Checkout — create a session and open Hosted Checkout
  2. Webhooks — verify signatures and mark the order paid on checkout.paid
  3. Install @doggiepay/checkout when you embed a pay button in your frontend

Hosts

HostRole
https://api.doggiepay.comREST API
https://merchant.doggiepay.comMerchant portal (keys, webhook, balances)
https://pay.doggiepay.comHosted Checkout / claim pages