Compatible with Stripe API version 2022-11-15
File: src/.env
(you can copy-paste content of src/.env.example
)
APP_DEBUG
- Debug mode (true
orfalse
)STRIPE_SECRET_KEY
- Stripe secret key (should start withsk_live_
) ; see API keys
If you want to use Stripe Connect, you should also set these variables:
STRIPE_SECRET_KEY
- Stripe secret key for the "parent" account (should start withsk_live_
) ; see API keysSTRIPE_CONNECTED_ACCOUNT
- Stripe account ID of the "child" account (should start withacct_
) ; see settingsFEE_PERCENTAGE
- Fee percentage (e.g.0.10
for 10%)
Documentation: https://stripe.com/docs/api/checkout/sessions/create
POST /checkout/session/subscription
Parameter | Required | Description |
---|---|---|
successUrl | required | The URL to which Stripe should send customers when payment or setup is complete. |
cancelUrl | required | The URL the customer will be directed to if they decide to cancel payment and return to your website. |
plan | required | Plan ID for this item. |
locale | (optional) | The IETF language tag of the locale Checkout is displayed in. |
Note
If you're upgrading from version 1.x, you must usesubscription
instead ofplan
in the request URL.
POST /checkout/session/payment
Parameter | Required | Description |
---|---|---|
successUrl | required | The URL to which Stripe should send customers when payment or setup is complete. |
cancelUrl | required | The URL the customer will be directed to if they decide to cancel payment and return to your website. |
amount | required | The amount to be collected per unit of the line item. |
currency | required | Three-letter ISO currency code, in lowercase. |
message | (optional) | The description for the line item, to be displayed on the Checkout page. |
locale | (optional) | The IETF language tag of the locale Checkout is displayed in. |
Note
If you're upgrading from version 1.x, you must usepayment
instead ofdonation
in the request URL.