Created
March 23, 2022 01:46
-
-
Save atwj/e5c4a79ab7cb98b01efc7a3e2538971f to your computer and use it in GitHub Desktop.
Stripe Checkout Sessions and add line items on the fly
This file contains hidden or 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 https://api.stripe.com/v1/checkout/sessions \ | |
| -u sk_test_: \ | |
| -d success_url="https://example.com/success" \ | |
| -d cancel_url="https://example.com/cancel" \ | |
| -d "line_items[0][price_data][currency]"="sgd" \ | |
| -d "line_items[0][price_data][product_data][name]"="School Fees" \ | |
| -d "line_items[0][price_data][unit_amount]"="300000" \ | |
| -d "line_items[0][quantity]"="1" \ | |
| -d "line_items[1][price_data][currency]"="sgd" \ | |
| -d "line_items[1][price_data][product_data][name]"="Convenience Fee" \ | |
| -d "line_items[1][price_data][unit_amount]"="8853" \ | |
| -d "line_items[1][quantity]"="1" \ | |
| -d "mode"="payment" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment