Skip to main content
POST
/
payments
Create a payment
curl --request POST \
  --url https://pandabase.io/api/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Storefront-Id: <x-storefront-id>' \
  --data '{
  "amount": 1000,
  "currency": "USD",
  "description": "Premium Plan",
  "display_ui": {
    "fields": [
      {
        "type": "input",
        "name": "username",
        "display_name": "Your Username"
      }
    ]
  },
  "return_url": "https://your-site.com/success",
  "cancel_url": "https://your-site.com/cancel"
}'
{
  "ok": true,
  "data": {
    "id": "pmnt_1234567890",
    "checkout_url": "https://pandabase.io/checkout/pmnt_xxx",
    "amount": 1000,
    "currency": "USD",
    "status": "pending"
  }
}

Authorizations

Authorization
string
header
required

V3 API key authentication. Format: sk_v3_xxxxx

Headers

X-Storefront-Id
string
required

Your storefront/shop ID

Body

application/json
amount
integer
required

Amount in cents

Example:

1000

currency
string
required

Three-letter currency code

Example:

"USD"

description
string
Example:

"Premium Plan"

display_ui
object
return_url
string<uri>
Example:

"https://your-site.com/success"

cancel_url
string<uri>
Example:

"https://your-site.com/cancel"

Response

Payment created successfully

ok
boolean
Example:

true

data
object