Use Existing Card on File
Migrate and vault payment methods from other processors (Stripe, Adyen, Chase, Braintree) into Basis Theory’s secure vault. Use existing customer payment data without requiring re-entry or new card collection.
Stripe Integration
This integration enables a platform to utilize their exsiting cards on file with Stripe to allow their customers to make purchases wiht the same card, without re-entry.
Prerequisites
- Stripe account with API access
- Stripe API key with payment method read permissions
- Valid Stripe payment method IDs to migrate
- Access to enable Stripe to forward to BTAI
API Endpoint
POST /tenants/{tenantId}/payment-methods/stripe
Authentication
This endpoint requires two authentication headers:
- BT-API-KEY: Your Basis Theory API key
- Stripe-API-Key: Your Stripe secret API key
Request Examples
curl --location ’https://api.stripe.com/v1/forwarding/requests' \
--header ‘Content-Type: application/x-www-form-urlencoded’ \
--header ‘Authorization: Bearer <STRIPE_API_KEY>’ \
--data-urlencode ‘payment_method=<STRIPE_PAYMENT_METHOD_ID>’ \
--data-urlencode ‘url=https://api.basistheory.ai/tenants/:id/payment-methods/stripe’ \
--data-urlencode ‘request[headers][0][name]=BT-API-KEY’ \
--data-urlencode ‘request[headers][0][value]=<BT_API_KEY>’ \
--data-urlencode ‘request[body]={“card”: { “number”: “”, “exp_month”: “”, “exp_year”: “”, “cvc”: “”, “name: “” }, “metadata”: { } }’ \
--data-urlencode ‘replacements[0]=card_number’ \
--data-urlencode ‘replacements[1]=card_expiry’ \
--data-urlencode ‘replacements[2]=card_cvc’\
--data-urlencode ‘replacements[3]=cardholder_name’
Adyen / Chase / Braintree Integrations
Each prossessor has their own unique method for detokenizing credentials to be shared with another 3rd party. If these other processors are interesting to you, we are happy to work with you on a flow to get them into a Payment Method.
Next Steps
Choose Your Checkout Flow
You have two main options for implementing checkout with your collected payment methods:
1. Browser Checkout (Recommended for Most Use Cases)
Browser Checkout - When the purchase will take place by driving a browser to coordinate the purchase on a websie.
Best for:
- E-commerce or Services with no API
2. API Checkout (Advanced Server-Side Processing)
API Checkout - Ideal for complex business scenarios requiring virtual card generation and server-side control.
Best for:
- E-commerce or Services with an API
Additional Resources
- Card Component Reference - Detailed component documentation
- Events Reference - Complete event handling guide
- API Reference - Payment method API documentation