#quentin
1 messages ยท Page 1 of 1 (latest)
According to the request generated from the trigger cli:
https://dashboard.stripe.com/test/logs/req_Z70emi0PXm7CD6?t=1674556291
billing.address.country is US, you should override it too
So i should add this flag ?
--add billing.address.country='FR'
yes, or try override it using this flag
https://stripe.com/docs/cli/trigger#trigger-override
I tried the override flag but It still returns the same error stripe trigger issuing_authorization.request --stripe-account 'ich_1MThWJIh95gXmtM2LpdofaOO' \ --override cardholder:id='ich_1MThWJIh95gXmtM2LpdofaOO' \ --override cardholder:billing.address.country='FR' \ --override cardholder:billing.address.line1='test rue' \ --override cardholder:billing.address.city='Lyon' \ --override cardholder:billing.address.postal_code=69002 \ --override card:id='ic_1MThZDIh95gXmtM2cGfzO109' \ --override card:cardholder.billing.address.country=FR \ --override merchant_data:name='Test' \ --override merchant_data:address='10 rue Pdt Edouard Herriot' \ --override merchant_data:country='FR' \ --override merchant_data:category='artists_supply_and_craft_shops' \ --override merchant_data:category_code=5970 \ --override merchant_data:city='Lyon'
Could you please share the resulting requestId ?
req_zBYjzy1YpJldxe?t=1674558448
thanks for sharing, please give me couple of minutes while checking
I think the problem is you are not putting a \ to break the first line so the rest of the arguments are ignored.
should be
stripe trigger issuing_authorization.request \
--stripe-account 'ich_1MThWJIh95gXmtM2LpdofaOO' \
--override cardholder:id='ich_1MThWJIh95gXmtM2LpdofaOO' \
--override cardholder:billing.address.country='FR' \
.....
.....
if I copy paste your command it breaks into two separate commands and the first one, which doesn't include the actual arguments, runs and gives that error. Maybe that's what's happening to you.
also note you can not do --override cardholder:id='ich_1MThWJIh95gXmtM2LpdofaOO' , that's not a thing(you can't make the returned object/event have a specific ID that way).
You can only use --override cardholder to set properties that exist on https://stripe.com/docs/api/issuing/cardholders/create .
If you specifically need to have an event relating to specific objects/cardholders it's a better idea to just call the test mode API in your own code, or create your own fixture for CLI โ you can see the CLI triggers that event by creating a cardholder + card + auth request : https://github.com/stripe/stripe-cli/blob/master/pkg/fixtures/triggers/issuing_authorization.request.json , so it always creates a new cardholder when you use stripe trigger issuing_authorization.request.
Ok thank you ! ๐
I didn't quite understand how to test the issuing_authorization.request webhook management with a specific card.
I dont want to create a carholder each time the webhook is triggered, is it possible to just target a specific card for the autorization ?
Sorry for the late reply,
This a fixture for test, you can't edit that simulation
But you can create your own fixture
https://github.com/stripe/stripe-cli/wiki/fixtures-command
yes but it will create a new cardholder each time, no ?
In my case, I have multiple connected account that creates and issues cards. I need to handle the payments for these cards. I was wondering if it is possible for me to trigger the authorization webhook for a card that I have already created in order to test my webhook handler.
Yes it create a new cardholder each time:
https://github.com/stripe/stripe-cli/blob/2bf13c1dbc2a3be683d16a54d3e06a0f9e7ed585/pkg/fixtures/triggers/issuing_authorization.request.json
The authorization must be related to a specific card to handle the authorization which depends on specific parameters I stored in my database
Try to manually call the endpoint /v1/issuing/cards/${card:id}/test/authorizations with an existing cardId
Or create a custom fixture triggers the authorizations for you, by creating something like this one:
https://github.com/stripe/stripe-cli/blob/2bf13c1dbc2a3be683d16a54d3e06a0f9e7ed585/pkg/fixtures/triggers/issuing_authorization.request.json#L36
Thank you ! I'll test that
The endpoint is not in the doc ? What are the parameters that we can specify ?