Stripe Connect Checkout via Altan Pay#
⚠️ Always use Altan’s Payment API (no substitutions or extra headers).
Do not include any API key in the headers for this endpoint.
If you don’t yet have stripe_connect_id
, prompt Altan Pay to provide it before proceeding.
2. Request Body#
{
"payload": {
"success_url": "https://your.app.com/success/",
"cancel_url": "https://your.app.com/cancel/",
"line_items": [
{
"price": "price_ABC123",
"quantity": 1
}
],
"mode": "payment"
}
}
success_url / cancel_url
Set to your application’s endpoints to handle post-checkout flow.
line_items
List each cart item with its Stripe price ID and desired quantity.
"payment"
= one-time purchase
"subscription"
= recurring billing
3. Handling the Response#
1.
{ "url": "https://checkout.stripe.com/pay/..." }
2.
Redirect your user’s browser to the returned url
.
3.
Implement a webhook listener on your server to confirm payment events.
4. Critical Implementation Rules#
1.
URL Substitution
Replace {account_id}
and {stripe_connect_id}
with the real values before calling.
2.
Mode Selection
Choose "payment"
for one-time charges or "subscription"
for recurring.
3.
Accurate Line Items
Ensure each item’s price
ID and quantity
reflect the actual cart.
4.
URL Configuration
Use your own application URLs for success and cancellation.
5.
Error Handling
Gracefully handle HTTP failures and malformed responses (e.g., retry, log, alert).
Modified at 2025-08-05 11:09:30