#fiend_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1247193744692744294
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
hi
Hmm the --add flag can be finicky. Honestly this is much easier to do via the --edit flag where you can edit the fixture in your IDE
But let me see if I can figure out the correct syntax for --add here as well
stripe trigger charge.succeeded --edit charge?
Just stripe trigger charge.succeeded --edit
cool
If you have VS Code (or any IDE) set as your default IDE for Git then it will open the fixture in VS Code
Then you can edit it and save + close the file and then the trigger will run with your updates
opened it in VIM, but that's fine i see why it's not working
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"amount": 100,
"currency": "usd",
"payment_method_types": ["card"],
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
]
}
Ah doh yeah you are looking for billing details on the Charge
ya
These fixtures use our newer APIs (PaymentIntents)
Which creates Charges
You would only have billing details directly on the Charge if you were using our legacy Charges API directly
Are you building a new integration here?
ya, Svelte 5
i updated svelte-stripe to work w/ svelte 5 and am working on an integration
Gotcha, well if you should update the PaymentIntent fixture to set payment_method_data.billing_details.email in this case: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_data-billing_details
That is how the billing details would get carried down to the Charge
great, thank you.
{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"amount": 100,
"currency": "usd",
"payment_method_types": ["card"],
"payment_method_data": {
name: null,
email: null,
},
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
]
}
then just pass it along i assume?
payment_method_data.billing_details.*
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "payment_intent",
"path": "/v1/payment_intents",
"method": "post",
"params": {
"amount": 100,
"currency": "usd",
"payment_method_types": ["card"],
"payment_method_data": {
"billing_details": {
"email": "test@test.com"
}
},
"payment_method": "pm_card_visa",
"confirm": true,
"description": "(created by Stripe CLI)"
}
}
]
}```
Ah you have to include payment_method_data.type as well
Okay nvm that isn't going to work with this trigger
Sorry for the confusion
Going this route assumes you are passing a raw PAN
With this trigger it is already passing a test card which would have the billing details associated to it already
So you can't actually do it this way.
gotcha
For what you are trying to do here the actual best/easiest way to do this is to not use the CLI at all
If you already have an integration set up then just hit the API to create a Charge and fill in the billing details client-side
They will be included at that point
๐
can close, thanks, i see what i gotta do either way
Happy to help
stripe has the best engineering staff in the industry i've been saying it for a long time, your response time was impeccable