palbaseDocs

Palbase Payments · API

POST/payments/channels/grants

Create credential connect grant

Mints a one-time browser URL so a human can connect Stripe, iyzico, or Masterpass credentials without passing secrets through an AI agent or CLI. The link names its channel (what is typed on the page names it only when the link names none) and is used once. A link an environment's token asks for sets up a project's first payment channel: with a channel connected already it sets up none and replaces none (409 channel_exists) — a channel is a buyer's to name at checkout, so a new one beside the project's own would take payments too.

Called by your server, with the project's secret key.

Request body

channel_keystring · optionalTarget channel key.
kind"stripe_key" | "iyzico_key" · requiredCredential kind: a Stripe restricted key, or iyzico's API and secret keys. Masterpass is set on an iyzico channel (POST /payments/channels, masterpass).
curl
curl -X POST "https://<your-ref>.palbase.studio/payments/channels/grants" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"kind":"stripe_key"}'

Responses

201Grant created

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation CreateChannelGrant of payments's contract.