Skip to main content
Hosted Checkout is Alguna’s pre-built payment page: you create a checkout session for a plan (or one-off line items), send the customer to its URL, and Alguna collects payment, creates the customer and subscription, and issues the paid invoice. Card data never touches your servers. This guide walks the dashboard and API paths to a working checkout; the session fields, statuses and fulfilment details are on the Hosted Checkout page, and the in-page variant is Embedded Checkout.

How It Works


Creating Checkout Sessions

Via Dashboard

Create a checkout link for a customer:
  1. Navigate to Customers → [Customer Name]
  2. Click Create Checkout Session
  3. Select the plan
  4. Copy the checkout URL
  5. Share with customer (email, chat, etc.)

Via Your Application

Create the session server-side with POST /checkout-sessions and redirect the customer to the url in the response:
See Hosted Checkout for every session field and the redirect flow, Embedded Checkout to render checkout inside your own page, and the API reference.

Checkout Experience

When customers visit the checkout URL, they see:
  1. Plan summary - Selected plan with pricing
  2. Customer information - Name, email, company
  3. Billing address - For tax calculation
  4. Payment method - Card or bank transfer
  5. Order summary - Total with tax
After completing payment:
  • Subscription is created automatically
  • Customer is redirected to your success URL
  • You receive webhook notification

Checkout Settings

Per session

Checkout behaviour is set per session, when you create it:

Branding and payment methods

Checkout uses the logo, colors and brand slug set under Settings → Organization → Customizations → Branding (Branding) and the payment methods enabled under Settings → Workflows → Payments → Payment methods (Stripe, ACH). To serve it from your own domain, see Custom domains.

Handling Checkout Completion

Success Page

When payment succeeds, customers are redirected to your success URL. Create a page that:
  • Confirms their subscription is active
  • Provides next steps or onboarding
  • Links to your application

Webhooks

For reliable delivery confirmation, set up webhooks: Configure webhooks under Settings → Connections → Developers → Webhooks; payload in the Webhooks reference. You can also poll GET /checkout-sessions/{id} until status is successful.

Testing Checkout

Sandbox Mode

Test checkout in sandbox before going live:
  1. Use a sandbox API key against https://api.sandbox.alguna.io
  2. Checkout sessions created in sandbox don’t process real payments
  3. Use test card numbers provided by your payment processor

Test the Flow

  1. Create a checkout session
  2. Visit the checkout URL
  3. Complete payment with test card
  4. Verify:
    • Redirected to success URL
    • Subscription created in dashboard
    • Webhook received (if configured)

Common Questions

Can customers apply discount codes?

No. Discounts are set on the plan or the subscription before checkout, not entered by the customer at the till.

What payment methods are supported?

Depends on your payment processor configuration:
  • Credit/Debit cards
  • ACH bank transfers (if enabled)
24 hours by default. Set expires_in_seconds when you create the session to change it, between 5 minutes and 7 days.

Can I pre-fill customer information?

Yes. Pass an existing customer_id or customer_alias, or a customer object for a guest checkout, and the customer account is created when checkout completes.

Troubleshooting

Checkout Page Not Loading

  1. Verify the checkout URL is valid
  2. Check the session hasn’t expired
  3. Ensure the plan is active

Payment Failed

  1. Customer should verify card details
  2. Check for sufficient funds
  3. Try a different payment method

Customer Not Redirected After Payment

  1. Verify success URL is correctly configured
  2. Check for browser popup blockers
  3. Ensure URL is publicly accessible

Best Practices

Clear Success Page

Create a success page that confirms the subscription and provides next steps.

Handle Webhooks

Always verify payment via webhooks, not just the redirect.

Test Thoroughly

Test the full flow in sandbox before going live.

Communicate Errors

If checkout fails, help customers understand what went wrong.

Next Steps

Customer Portal

Let customers manage their subscriptions.

Webhooks

Set up event notifications.

Launch self-serve

Trials, credits, checkout and portal in one flow.

Developer quick start

API basics, SDK and sandbox.