#jenOng

1 messages · Page 1 of 1 (latest)

tame jackalBOT
worthy spire
#

So something like:

                    proration_behavior: 'always_invoice',
                    items: [
                        {
                            id: payload.subscriptionItemId,
                            plan: payload.newPlan.yearly_price_id,
                        },
                    ],
                    proration_date: payload.prorationDate,
                      metadata: {
                        'order_id': '6735',
                      },
                });```
rose thistle
#

I've tried this, however, when I check the charge.succeeded event, the metadata does not show.

worthy spire
#

Metadata isn't automatically copied between objects

#

Metadata on the Subscription will get copied to the Invoice Items that are associated with the subscription but it won't get copied to the payments

#

You can copy the metadata down to the charge when you get that event, but you will need to retrieve it from the subscription itself first