discovery_add_payment_method
Add a Stripe payment method to your Disco account to enable credit purchases and paid plan subscriptions. Tokenize card details via Stripe's API first for secure processing.
Instructions
Attach a Stripe payment method to your Disco account.
The payment method must be tokenized via Stripe's API first — card details
never touch Disco's servers. Required before purchasing credits
or subscribing to a paid plan.
To tokenize a card, call Stripe's API directly:
POST https://api.stripe.com/v1/payment_methods
with the stripe_publishable_key from your account info.
Args:
payment_method_id: Stripe payment method ID (pm_...) from Stripe's API.
api_key: Disco API key (disco_...). Optional if DISCOVERY_API_KEY env var is set.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payment_method_id | Yes | ||
| api_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |