Created
October 21, 2021 08:51
-
-
Save toruf-stripe/ae3331670bcee9e74d3f5e57e64f41fe to your computer and use it in GitHub Desktop.
Create a Checkout session to subscribe emulating billing cycle anchor and proration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://api.stripe.com/v1/checkout/sessions \ | |
-u {SECRET_KEY}: \ | |
-d cancel_url="https://example.com" \ | |
-d success_url="https://example.com" \ | |
-d mode="subscription" \ | |
-d line_items[0][price]={DAILY_PRICE_ID} \ | |
-d line_items[0][quantity]=5 \ | |
-d line_items[1][price]={MONTHLY_PRICE_ID} \ | |
-d line_items[1][quantity]=1 \ | |
-d subscription_data[trial_end]=1635724801 \ | |
-d payment_method_types[0]="card" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment