#greenlane-otavio_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- greenlane-otavio_api, 3 days ago, 28 messages
Before asked:
I saw those:
https://docs.stripe.com/testing
https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=embedded-form
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.
It is super verbose, I mean, I don't believe that I am the first person who wants to test the whole Stripe Flow!
hi there!
Hey there.
I would love having a test, a super single test to include a payment with a custom metadata
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?
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}
you want specifically for the payment_method.attached event?
if so, I don't think you can use the CLI in this case. you would need to make a real API call.
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()
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
Let me try
It does not allow me to do this as well:
that's normal. you cannot set anymetadataparameter in the/attachcall: https://docs.stripe.com/api/payment_methods/attach?lang=node
It does not allow me to:
stripe trigger payment_method.attached --override customer:"metadata[foo]"=bar
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
So, I cannot use metadata field?
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.
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?
let's take a step back:
- we don't recommend attaching a payment method. instead you should use a SetupIntent: https://docs.stripe.com/api/setup_intents/create?lang=node
- once the PaymentMethod is created, just update it with some
metadataif needed: https://docs.stripe.com/api/payment_methods/update?lang=node
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.
how do you accept payments currently? Checkout Session, Payment Element, something else?
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.
๐ stepping in here
Sounds like you want to use a Webhook to know when a PaymentMethod is attached to a Customer, correct?
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?
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
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.
Mobile
Okay and which Mobile flow
Payment Sheet?
Can you share the docs you are following?
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?
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
Is there any event after that I can append the metadata?
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
In this case, what event name?
Usually payment_intent.succeeded
But as I have noted several times already it is hard to say without knowing what integration you are pursuing
In this case I will not receive the final 4 card digits, right?
another question: is the event payment_method.attached deprecated?
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
I mean, if you are recommeding this intent instead of another: https://docs.stripe.com/api/payment_methods/attach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
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?
We are going in circles.
I can't tell you that until you explain what specific integration you are building.
Yes, we are ๐ฆ