Palbase Payments · API
/payments/me/wallets/top-upTop up my wallet
Creates and initiates a real-money PaymentIntent to top up one of the customer's wallets. The top-up's channel is the project's routing's: a channel naming another than routing picks answers 403 channel_choice_forbidden. In an environment gone live, a top-up through a test or sandbox channel answers 409 channel_mode_mismatch before its form. Past the buyer's limit of failed payments — by its address, and by the customer — it answers 429 velocity_limit_exceeded, as a confirmation does, and a card refused here counts toward it.
Called by a signed-in user of your app, with their token and the publishable key.
Headers
Idempotency-Keystring · optionalUnique client-supplied idempotency key (1-255 chars), the user's own: a top-up sent again under it is the payment the first made. One whose answer was lost (503 payment_outcome_unknown, which names the payment as intent_id) is asked of its provider again, and its card is never charged twice.Request body
amountinteger (int64) · requiredTop-up amount in minor units.cancel_urlstring · optionalAllowed cancel URL.channelstring · optionalOptional channel override.method_idstring · optionalOptional saved payment method UUID.phonestring · optionalPhone number for Masterpass.return_urlstring · optionalAllowed return URL.save_methodboolean · optionalSave card after top-up succeeds.use_masterpassboolean · optionalPay via Masterpass OTP.wallet_keystring · requiredTarget wallet key.curl -X POST "https://<your-ref>.palbase.studio/payments/me/wallets/top-up" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"amount":0,"wallet_key":"string"}'Responses
201Top-up initiated
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation TopUpMyWallet of payments's contract.