#greenlane-otavio_webhooks

1 messages ยท Page 1 of 1 (latest)

nova dustBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1286303517119610961

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

stoic tangle
#

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

Learn how to save payment details and charge your customers later.

#

It is super verbose, I mean, I don't believe that I am the first person who wants to test the whole Stripe Flow!

sterile palm
#

hi there!

stoic tangle
#

Hey there.

#

I would love having a test, a super single test to include a payment with a custom metadata

sterile palm
#

I wanto to create a webhook using metadata, but by CLI it does not allow me.
what do you mean by "create a webhook"? do you mean send a webhook event to your server?
and what do you meant by "using metadata"? you want the event paylod to contain some metadata?

stoic tangle
#

btw; the documentation command it not working:

stripe samples create checkout-remember-me-with-twilio-verify

#

I would love to create an event like this id: evt_1Q0JWq1njmFqhzphe7REClbQ
But with some internal metadata information

#

stripe trigger payment_method.attached --overwrite metadata = {Myinternal data}

sterile palm
#

you want specifically for the payment_method.attached event?

stoic tangle
#

Yes!

#

The payment_method.attached is a sample

sterile palm
#

if so, I don't think you can use the CLI in this case. you would need to make a real API call.

stoic tangle
#

It does not allow me to do this as well:

val params = PaymentMethodCreateParams.builder() .setType(PaymentMethodCreateParams.Type.CARD) .setCard( PaymentMethodCreateParams.CardDetails.builder() .setNumber("4242424242424242") .setExpMonth(12L) .setExpYear(2025L) .setCvc("123") .build() ).putMetadata("order_id", "6735") .putMetadata("customer_email", "customer@example.com") .build()

sterile palm
#

of example if you want to add metadata to a customer.created event with the CLI, it would be like this: trigger customer.created --override customer:"metadata[foo]"=bar

stoic tangle
#

Let me try

sterile palm
stoic tangle
#

It does not allow me to:
stripe trigger payment_method.attached --override customer:"metadata[foo]"=bar

sterile palm
#

yes I explained why just above

#

but after the payment method is attached, you could make an extra API call to update the PaymentMethod object itself

stoic tangle
#

So, I cannot use metadata field?

sterile palm
#

you can use metadata on the PaymentMethod. but you cannot set metadata while attaching the payment method.

#

you have to do it before or after attaching, with an extra API call.

stoic tangle
#

My goal is having a mobile to add the payment and I will listen to the server

#

I would like to have this metadata to link both services

#

If I cannot set at the PaymentMethod, how can I procedure?

sterile palm
stoic tangle
#

So, I should not listening to payment_method.attached at the backend?

#

My goal is to listen an evento to add a payment method.

I want to test this point only.

I need to create a test flow.

sterile palm
#

how do you accept payments currently? Checkout Session, Payment Element, something else?

stoic tangle
#

Right now, we don't have this point implement it.
This part is doing by Mobile team.

#

My goal is to listening the new payment method and check the token id form the payment method.

nova dustBOT
glossy yacht
#

๐Ÿ‘‹ stepping in here

#

Sounds like you want to use a Webhook to know when a PaymentMethod is attached to a Customer, correct?

stoic tangle
#

Yes!!!

#

And I need to kknow who, that is the reason of using this metadata

glossy yacht
#

Okay so to discuss the best way to do this we need to know what integration flow you are using.

#

Are you following a specific set of docs here?

stoic tangle
#

Yes!

#

I read your documentation and I am listing to the "payment_method.attached"to include a payment method and "payment_method.detached" when we removed

#

I am using this docs as reference

glossy yacht
#

Sure that works to know when a PaymentMethod is attached to a Customer

#

However that doesn't answer the metadata part

#

And there might be better ways to do this than using that Event really

#

But to help I need to now which integration flow you are using -- like Stripe Checkout? Elements? Mobile? etc.

stoic tangle
#

Mobile

glossy yacht
#

Okay and which Mobile flow

#

Payment Sheet?

#

Can you share the docs you are following?

stoic tangle
#

As I said, I am working on the listing event side.

#

My work is only in the trigger...

#

So, metadata to PaymentMethoddoes not work, am I right?

glossy yacht
#

Well you can't add metadata to a PaymentMethod during a payment flow. You would have to update it after it has been created.

#

So no, that won't work

#

Because the payment_method.attached Event will have already fired at that point

stoic tangle
#

Is there any event after that I can append the metadata?

glossy yacht
#

Sorry I don't know what you mean by that

#

You can set metadata on the PaymentIntent for instance

#

And that will come through via a Webhook

stoic tangle
#

In this case, what event name?

glossy yacht
#

Usually payment_intent.succeeded

#

But as I have noted several times already it is hard to say without knowing what integration you are pursuing

stoic tangle
#

In this case I will not receive the final 4 card digits, right?

#

another question: is the event payment_method.attached deprecated?

glossy yacht
#

You can retrieve the PaymentIntnet upon receiving the Webhook and expand the latest_charge to see the payment_method_data which will contain the last4

#

Or you could retrieve the PaymentMethod itself

stoic tangle
glossy yacht
#

I don't understand that question

#

And I can't recommend any Events if you aren't going to give me more information about the integration flow you are building

stoic tangle
#

My point, I need to, using Stripe, take the token to a payment method that can be used in the future for payments.

#

So, I need to listen to event to eachive it

#

My question is, how can I do this?

glossy yacht
#

We are going in circles.

#

I can't tell you that until you explain what specific integration you are building.

stoic tangle
#

Yes, we are ๐Ÿ˜ฆ