Skip to main content
POST
/
stores
/
{storeId}
/
mandates
Create a billing agreement
curl --request POST \
  --url https://api.pandabase.io/v2/core/stores/{storeId}/mandates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "<string>",
  "description": "<string>",
  "frequency": "ONE_OFF"
}
'
{
  "ok": true,
  "data": {
    "id": "<string>",
    "status": "REQUIRES_ACTION",
    "agreementUrl": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pandabase.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Store API token. Use the sk_ prefixed secret key as the Bearer token.

Path Parameters

storeId
string
required

Store ID (shp_ prefix)

Required string length: 12 - 48

Body

application/json
customerId
string
required

ID of the customer this mandate is tied to (cus_ prefix). Create the customer via the Customers API first.

description
string
required

Why you want to charge this customer. Surfaced in the agreement flow.

frequency
enum<string>
required

ONE_OFF: a single expected charge — auto-revokes after first success. WEEKLY: one charge every 7 days. MONTHLY: one charge every 30 days. QUARTERLY: one charge per quarter. YEARLY: one charge per year. AD_HOC: no fixed cadence — charge whenever you need to.

Available options:
ONE_OFF,
WEEKLY,
MONTHLY,
QUARTERLY,
YEARLY,
AD_HOC

Response

Mandate created

ok
boolean
required
data
object
required

A billing agreement (mandate) authorizing the merchant to charge the customer's saved payment method on demand.