#fiend_webhooks

1 messages ยท Page 1 of 1 (latest)

civic juniperBOT
#

๐Ÿ‘‹ 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.

broken cairn
#

Hello

analog talon
#

hi

broken cairn
#

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

analog talon
#

stripe trigger charge.succeeded --edit charge?

broken cairn
#

Just stripe trigger charge.succeeded --edit

analog talon
#

cool

broken cairn
#

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

analog talon
#

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)"
      }
    }
  ]
}
broken cairn
#

Ah doh yeah you are looking for billing details on the Charge

analog talon
#

ya

broken cairn
#

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?

analog talon
#

ya, Svelte 5

#

i updated svelte-stripe to work w/ svelte 5 and am working on an integration

broken cairn
#

That is how the billing details would get carried down to the Charge

analog talon
#

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?

broken cairn
#

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.

analog talon
#

gotcha

broken cairn
#

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

analog talon
#

ya

#

cool, ya i'll just run it that way

#

it's being finicky, that worked fine

broken cairn
#

๐Ÿ‘

analog talon
#

can close, thanks, i see what i gotta do either way

broken cairn
#

Happy to help

analog talon
#

stripe has the best engineering staff in the industry i've been saying it for a long time, your response time was impeccable