Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cjavilla-stripe/7eff9d512d160763b7189a9d4e95bfc0 to your computer and use it in GitHub Desktop.
Save cjavilla-stripe/7eff9d512d160763b7189a9d4e95bfc0 to your computer and use it in GitHub Desktop.
Fixture for firing payment_intent.succeeded with Customer.
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "customer",
"path": "/v1/customers",
"method": "post",
"params": {
"description": "(created by Stripe CLI)"
}
},
{
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"amount": 2000,
"confirm": "true",
"currency": "usd",
"customer": "${customer:id}",
"description": "(created by Stripe CLI)",
"payment_method": "pm_card_visa",
"payment_method_types": ["card"],
"shipping": {
"name": "Jenny Rosen",
"address": {
"line1": "510 Townsend St",
"postal_code": "94103",
"city": "San Francisco",
"state": "CA",
"country": "US"
}
}
}
}
]
}
@cjavilla-stripe
Copy link
Author

Download this file and use stripe fixtures <filename> to trigger a payment_intent.succeded event with a PaymentIntent containing a Customer object.

stripe fixtures payment_intent.succeeded.with_customer.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment