#wilder-checkout-metadata

1 messages · Page 1 of 1 (latest)

mint pelican
#

What API call are you making to update metadata? Can you post the code for it?

timber loom
#

One sec!

mint pelican
#

Ah, so what endpoint are you calling? Like, which Stripe object is being updated?

timber loom
#

(this is a raw body)

mint pelican
#

Ah, okay I see. Do you have the request ID or the Checkout Session ID I can use to look up on my end what we're receiving?

Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

timber loom
#

You can see here:

{
"id": "cs_test_b1cHvFWEuZykPfDoWvF0Hlqrnvq891eugeoawNzbe6HiYimkLpluRZeejN",
"object": "checkout.session",
"livemode": false,
"payment_intent": "pi_3L8slcGEi8jScj3f1vXsdGWR",
"status": "complete",
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 120000,
"amount_total": 120000,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "https://example.com/cancel",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"currency": "usd",
"customer": "cus_LoHomGMb2ffRJx",
"customer_creation": null,
"customer_details": {
"address": {
"city": "Tucson",
"country": "US",
"line1": " 123 xxxx xxx",
"line2": null,
"postal_code": "85747",
"state": "AZ"
},
"email": "xxx@xxxx.com",
"name": "xxx xxx",
"phone": null,
"tax_exempt": "none",
"tax_ids": [
]
},
"customer_email": null,
"expires_at": 1654895987,
"locale": null,
"metadata": {
"connect-acct": "xxxxxxx"
},
"mode": "payment",
"payment_link": null,
"payment_method_options": {
},
"payment_method_types": [
"card"
],
"payment_status": "paid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": null,
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [
],
"shipping_rate": null,
"submit_type": null,
"subscription": null,
"success_url": "https://example.com/success",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"url": null
}

#

metadata > connect-acct: xxxx

BUT in the dashboard this doesn't display D:

mint pelican
timber loom
mint pelican
#

It looks like it's being set just fine (like you said), but it's being set on the Checkout Session object. You're looking at the Payment Intent object, which has its own metadata attribute

timber loom
#

Well

#

this makes sense

#

So I would just reference the payment id from the checkout session and update it that way?

mint pelican
#

Yep! Exactly