forked from stripe/stripe-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invoice action required trigger (stripe#625)
* Invoice action required trigger * Add expected error
- Loading branch information
1 parent
e90728c
commit d594d7d
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
67 changes: 67 additions & 0 deletions
67
pkg/fixtures/triggers/invoice.payment_action_required.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"_meta": { | ||
"template_version": 0 | ||
}, | ||
"fixtures": [ | ||
{ | ||
"name": "customer", | ||
"path": "/v1/customers", | ||
"method": "post", | ||
"params": { | ||
"description": "(created by Stripe CLI)", | ||
"source": "tok_visa" | ||
} | ||
}, | ||
{ | ||
"name": "invoiceitem", | ||
"path": "/v1/invoiceitems", | ||
"method": "post", | ||
"params": { | ||
"amount": 2000, | ||
"currency": "usd", | ||
"customer": "${customer:id}", | ||
"description": "(created by Stripe CLI)" | ||
} | ||
}, | ||
{ | ||
"name": "invoice", | ||
"path": "/v1/invoices", | ||
"method": "post", | ||
"params": { | ||
"customer": "${customer:id}", | ||
"description": "(created by Stripe CLI)" | ||
} | ||
}, | ||
{ | ||
"name": "payment_method", | ||
"path": "/v1/payment_methods", | ||
"method": "post", | ||
"params": { | ||
"type": "card", | ||
"card": { | ||
"exp_month": 7, | ||
"exp_year": 25, | ||
"number": "4000000000003220", | ||
"cvc": "424" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "attach_payment_method", | ||
"path": "/v1/payment_methods/${payment_method:id}/attach", | ||
"method": "post", | ||
"params": { | ||
"customer": "${customer:id}" | ||
} | ||
}, | ||
{ | ||
"name": "pay_invoice", | ||
"path": "/v1/invoices/${invoice:id}/pay", | ||
"method": "post", | ||
"expected_error_type": "card_error", | ||
"params": { | ||
"payment_method": "${payment_method:id}" | ||
} | ||
} | ||
] | ||
} |