Payments
Stripe Checkout, the billing portal and subscriptions behind a handful of calls.
Read the docs →.phlo
// thin wrappers over the Stripe SDK. boot once, then call.
Stripe::boot(%creds->stripe->secret)
route POST subscribe {
$session = Stripe::checkout([
'mode' => 'subscription',
'line_items' => [['price' => Stripe::price('pro')->id, 'quantity' => 1]],
'success_url' => %req->base.'/welcome',
'cancel_url' => %req->base.'/pricing',
])
location($session->url)
}
Pro
€12/mo
- Everything in Free
- Priority support
Stripe::checkout() returns the URL, location() sends them there.
