#greenlane-otavio_api

1 messages ¡ Page 1 of 1 (latest)

frigid barnBOT
#

👋 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/1285181981482684488

📝 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.

small eagle
#

I hope this message finds you well.
I am currently testing Stripe using the CLI sandbox, following the instructions provided in your documentation. Specifically, I am trying to overwrite the metadata field while triggering an event using the command below:
stripe trigger payment_method.attached --override metadata:GREANLANE_USER_ID="2342342"
However, the metadata field remains empty despite using this command, and the override does not seem to work as expected.
For reference, here is the relevant portion of the JSON response I am seeing, where the metadata field remains empty:
Event id: evt_1Pxol61njmFqhzphBEhuq096
https://dashboard.stripe.com/test/workbench/events/evt_1Pxol61njmFqhzphBEhuq096
{ "object": { "id": "pm_1Pxol51njmFqhzphM8t7YS5Q", "object": "payment_method", "allow_redisplay": "unspecified", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "display_brand": "visa", "exp_month": 9, "exp_year": 2025, "fingerprint": "5HEtFZvMGkYtkqh2", "funding": "credit", "generated_from": null, "last4": "4242", "networks": { "available": [ "visa" ], "preferred": null }, "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1726054251, "customer": "cus_QpTiETw2bjbYBH", "livemode": false, "metadata": {}, "type": "card" }, "previous_attributes": null }

Could you please help me understand how to correctly fill in the metadata during sandbox testing?

lofty cove
#

What are you trying to achieve exactly?

#

And what are you trying to test?
CLI event triggers are only good to test webhooks.

small eagle
#

I am changing the: "metadata": {}

#

That is what I would love to do

#

And Yes, I am testing the payment method webhooks

lofty cove
#

Changing where exactly? On which object?

small eagle
#

Can you see the json that I sent to you?

#

at the metadata field

#

That is the command that I am running:

stripe trigger payment_method.attached --override metadata:GREANLANE_USER_ID="2342342"

lofty cove
#

I undertstand that you want to update metadata field. But most Stripe objects have a metadata field, and stripe trigger might require creating multiple test objects to simulate sending an event.

#

On which exact object do you want to set the metadata?

small eagle
#

at the Payment Method

#

sorry, first time using this API

lofty cove
#

Fixtures/Triggers are fine to test the most basic event scenarios, but if you want any better level of customization, I recommend building a simple integration in Test mode and use test cards: https://stripe.com/docs/testing

small eagle
#

I do need any feild to link the payment method to my user

#

If I cannot do it at metadata, how can I procedure it?

#

When I ran:

stripe trigger payment_method.attached --override payment_method_attach:metadata.GREANLANE_USER_ID=2342342

it returns:

Setting up fixture for: customer Running fixture for: customer Setting up fixture for: payment_method_attach Running fixture for: payment_method_attach Trigger failed: Request failed, status=400, body={ "error": { "code": "parameter_unknown", "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown", "message": "Received unknown parameter: metadata", "param": "metadata", "request_log_url": "https://dashboard.stripe.com/test/logs/req_3r6SEmyCJMZpP2?t=1726482828", "type": "invalid_request_error" } }

#

I can do with:

stripe trigger payment_method.attached --override payment_method_attach:customer=cus_QrKxrpmchaW2IM

But not with the metadata. I need some field to link to my system

lofty cove
#

I need some field to link to my system
What do you mean by this?

#

As I mentioned. This is not possible with CLI stripe trigger command.

small eagle
#

Ok, is there any way to trigger a webhook without CLI?

lofty cove