Palbase Payments · API
/payments/intentsCreate payment intent
Creates a server-sealed PaymentIntent (card, split wallet+card, full wallet, or guest checkout). Requires the project's secret key unless allow_client_payments is explicitly enabled. A signed-in user's payment (allow_client_payments) naming a channel other than routing picks answers 403 channel_choice_forbidden. In an environment gone live, a payment a wallet pays part of through a test or sandbox channel answers 409 channel_mode_mismatch. A payment of a test or sandbox channel — or one made before the environment went live — refunded to a wallet after it gives its money to the closed test account, not to the wallet.
Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Headers
Idempotency-Keystring · optionalUnique client-supplied idempotency key (1-255 chars): the payment's creation sent again under it is answered with the payment the first made (Idempotent-Replayed: true), its answer kept with the payment as it is made. Kept per caller: the project's secret key, or a user session. A visitor with neither cannot send one (400 idempotency_key_needs_session): nothing tells one visitor's key from another's, and the kept answer carries the payment's client secret.Request body
amountinteger (int64) · requiredTotal payment amount in minor units.buyerobject · optionalCustomer billing/shipping details sealed at rest.cancel_urlstring · optionalAllowed app cancel URL.capture_method"automatic" | "manual" · optionalautomatic (default) or manual.channelstring · optionalOptional explicit channel key override.currencystring · required3-letter ISO 4217 currency code.customer_idstring · optionalCustomer UID (optional for guest checkout).descriptionstring · optionalHuman-readable payment description.expires_in_secondsinteger (int32) · optionalOptional PaymentIntent expiry TTL in seconds (60..86400). A payment a wallet and a card pay together lives an hour at most, whatever is asked: its wallet share is held for as long as it lives.installmentsobject · optionalInstallment configuration for an intent.itemsobject[] · optionalOrder line items.metadataobject · optionalArbitrary JSON metadata.provider_optionsobject · optionalOptional typed provider-specific escape-hatch parameters.referencestring · optionalMerchant order or invoice reference.return_urlstring · optionalAllowed app return URL after checkout or 3DS.splitsobject[] · optionalOptional marketplace split lines.wallet_amountinteger (int64) · optionalPortion of amount paid from the customer's wallet in minor units.wallet_keystring · optionalWallet key for split or full-wallet payment.curl -X POST "https://<your-ref>.palbase.studio/payments/intents" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"amount":0,"currency":"string"}'Responses
201PaymentIntent created
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation CreateIntent of payments's contract.