Stripe API Tester

Payment Intent and Charge Flow

  • Simulates a user making a payment with a new card
ActionCommand
Create a customer
python stripe_api_tester.py -s customer --create
Create a payment intent and charge
python stripe_api_tester.py -s create_intent `
--customer_id cus_UPFFtoc1PTOrIu `
--account_id acct_1TQMRTJeHnkI0IL3 `
--account_type express
Attach a card to the intent
python stripe_api_tester.py -s authorize `
--intent_id pi_3T7aITJk04sCoXnA0fgfqHcQ `
--name "Lorraine Mills" --email "Lorraine.Mills@example.com"
Cancel the intent
python stripe_api_tester.py -s intent `
--cancel pi_3T7aITJk04sCoXnA0fgfqHcQ
Charge the intent
python stripe_api_tester.py -s charge `
--method_id pm_1T7aJ7Jk04sCoXnA7kkfEd2P `
--amount 1000 --customer_id cus_U5lpJ4boSpWBXr `
--account_id acct_1T7a2OJk046cELiB `
--account_type express --capture

Miscellaneous API Calls

CategoryActionCommand
AccountRetrieve account infopython stripe_api_tester.py -s account -get acct_1T4ayhJk040WViwe
IntentRetrieve payment intentpython stripe_api_tester.py -s intent --get pi_3T7YvoJk04sCoXnA1V3DWs7g
IntentRetrieve payment intent chargespython stripe_api_tester.py -s intent --get_charges pi_3T7aJqJk04sCoXnA0TJUv3FE