#Jesserson

1 messages · Page 1 of 1 (latest)

sick vaporBOT
magic sable
#

Can you share the request ID (req_xxx) where you set the metadata on the Checkout Session? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request

daring turret
#

the request id is req_I1c0ibifQp0XHt

#

i see the metadata is being nested within the subscription_data field, though i am setting the field as follows:

      customerRef,
      "checkout_sessions"
    );

    const docRef = await addDoc(customerCheckoutSessionsRef, {
      mode: mode,
      line_items: lineItems,
      success_url: successUrl,
      cancel_url: cancelUrl,
      metadata: {
        fulfilled: false,
      },
    });```
magic sable
daring turret
#

so this would require a post to the checkout session after the document is created? is there no way to set the metadata when creating the document?

#

also, is there another standard way to track fulfillment status, or delivery status of orders, that i natively supported by stripe, instead of setting a custom metadata field?

#

thanks again for your help!

magic sable
#

metadata field on Checkout Session can only be set during Checkout Session creation request. It can't be updated afterwards.

#

I'm not too sure what "document" are you referring to here?

#

If you're referring "document" as Checkout Session, then metadata should be set when you make the request to create it

daring turret
#

i'm referring to the firestore document that is created in the checkout_sessions collection, i am using the firebase stripe integration

magic sable
#

also, is there another standard way to track fulfillment status, or delivery status of orders, that i natively supported by stripe, instead of setting a custom metadata field?
This should be kept track within your system, not Stripe

#

I'm not too sure how firebase integration works, but it should be possible to set metadata in the Checkout Session that I mentioned

daring turret
#

im confused why the field is being nested under the subscription_data field, when i am not specifying that in the request

magic sable
daring turret
#

ok great, thanks for the recommendation!