#SoloGeneral-issuing-cli
1 messages · Page 1 of 1 (latest)
Thanks!
Can you clarify - why are you passing the Issuing Card ID into the requests that's creating the Issuing Card?
I need an issuing_authorization.request webhook that uses a card that is in our system because we look up the employee based on their card id when we receive the webhook. So in order to test it I have to specify a card that exists in our system.
Here is a link to a thread I had here previously before opening the github ticket #dev-help message
Gotcha, so then in that case you don't need to make the request to create a new Issuing Card at all - you'd only need the last request from this fixture here (https://github.com/stripe/stripe-cli/blob/d38eedd2488a5d28ac9d96cec6c5bc40628df12c/pkg/fixtures/triggers/issuing_authorization.request.json) and replace the "path" to use the Issuing Card you already ahve
Ok. Knowing that, I tried this
stripe trigger - --raw '{"_meta": {"template_version": 0}, "fixtures": [{"name": "authorization_request","path": "/v1/issuing/cards/ic_1LcWIuR4sTLeLkjx5TcI59d6/test/authorizations","method": "post","params": {"held_amount": 100,"authorization_method": "online"}}]}'
And it gave me:
Running fixture for: authorization_request
Trigger failed: Request failed, status=404, body={
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such issuing card: 'ic_1LcWIuR4sTLeLkjx5TcI59d6'",
"param": "card",
"type": "invalid_request_error"
}
}
I just retrieved that card's info through the rails console so I know that it exists.
'ic_1LcWIuR4sTLeLkjx5TcI59d6', stripe_account: "acct_1LcWFtR4sTLeLkjx"
=> #<Stripe::Issuing::Card:0x3dc84 id=ic_1LcWIuR4sTLeLkjx5TcI59d6> JSON: {
"id": "ic_1LcWIuR4sTLeLkjx5TcI59d6",
"object": "issuing.card",
"brand": "Visa",
"cancellation_reason": null,
"cardholder": {"id":"ich_1LcWItR4sTLeLkjxPiwt0FXQ","object":"issuing.cardholder","billing":{"address":{"city":"San Francisco","country":"US","line1":"600 Harrison Street 3rd Floor","line2":null,"postal_code":"94107","state":"CA"}},"company":null,"created":1661873079,"email":"manager@udemy.com","individual":null,"livemode":false,"metadata":{},"name":"Mr Manager","phone_number":"+17604833694","requirements":{"disabled_reason":null,"past_due":[]},"spending_controls":{"allowed_categories":[],"blocked_categories":[],"spending_limits":[],"spending_limits_currency":null},"status":"active","type":"individual"},
"created": 1661873080,
"currency": "usd",
"exp_month": 7,
"exp_year": 2025,
"last4": "0005",
"livemode": false,
"metadata": {"order_id":"6735"},
"pin": null,
"replaced_by": null,
"replacement_for": null,
"replacement_reason": null,
"shipping": null,
"spending_controls": {"allowed_categories":null,"blocked_categories":null,"spending_limits":[{"amount":50000,"categories":[],"interval":"yearly"}],"spending_limits_currency":"usd"},
"status": "active",
"type": "virtual",
"wallets": {"apple_pay":{"eligible":true,"ineligible_reason":null},"google_pay":{"eligible":true,"ineligible_reason":null},"primary_account_identifier":null}
}
You're getting this error because the Issuing card ic_1LcWIuR4sTLeLkjx5TcI59d6 belongs to a connected account, but the Stripe CLI is making requests as the platform. Try the stripe trigger reequest again but set --stripe-account to the ID Of the connected account (see https://stripe.com/docs/cli/trigger#trigger-stripe_account)
That does seem to have done it. Thank you so much for your help with this!