Last active
June 12, 2021 08:22
-
-
Save vipulwairagade/9c3bdbbc6fc8eab3ca4e2eefcab21c52 to your computer and use it in GitHub Desktop.
Manually end the trial period within 30 seconds and trigger auto payment renewal in stripe.
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
export CUSTOMER_ID=cus_JV1oMxxxxxCCw | |
export SUBSCRIPTION_ID=sub_JV2G7xxxxxxBKFa | |
export STRIPE_TEST_TOKEN=sk_test_51HMsgYCFXNjKOD0xNWNyQ859bPyxxxxxxxxxxxxxxxxxxxxxxxxxOPZnZDm300IKhBt8tz | |
curl -u ${STRIPE_TEST_TOKEN}: \ | |
-d billing_cycle_anchor=now \ | |
https://api.stripe.com/v1/customers/${CUSTOMER_ID}/subscriptions/${SUBSCRIPTION_ID} |
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
export CUSTOMER_ID=cus_InFwpxxxxxxZ21 | |
export SUBSCRIPTION_ID=sub_InFyFxxxxxxSaX | |
export STRIPE_TEST_TOKEN=sk_test_51HUxxxxxxxxxxxxxxxxxxxxxxRuYVUqwn6qth9BNvexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0MnvOf7jk | |
curl -u ${STRIPE_TEST_TOKEN}: \ | |
-d trial_end=$(date -d "+30 sec" +%s) \ | |
https://api.stripe.com/v1/customers/${CUSTOMER_ID}/subscriptions/${SUBSCRIPTION_ID} |
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
export STRIPE_TEST_TOKEN=sk_test_51HUxxxxxxxxxxxxxxxxxxxxxxRuYVUqwn6qth9BNvexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0MnvOf7jk | |
export INVOICE_ID=in_1ICM98DuCwnQZhY2HdVl2gzA | |
curl -X POST -u ${STRIPE_TEST_TOKEN}: \ | |
https://api.stripe.com/v1/invoices/${INVOICE_ID}/pay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment