#Tanuki-metadata

1 messages · Page 1 of 1 (latest)

spiral hamlet
silk agate
#
[
  'price_data' => [
    'currency' => 'EUR',
    'product_data' => [
      'name' => "Bonplan offert ({$cheapestPromotion->getDays()} jours)",
      'metadata' => [
        'type' => 'promotion_duration',
        'promotion_duration_id' => $cheapestPromotion->getId()
      ]
    ],
    'unit_amount' => 0
  ],
  'quantity' => $quantity
]
spiral hamlet
#

Do you have the request id from when you added this metadata but it wasn't present? (req_123)

silk agate
#

req_d59xINnQH5ATqR

spiral hamlet
#

Thank you

#

So the metadata for this won't be on the price it will be on the product

#

I can see it on the product created from that call pr_1JkqoSB6k3O8qWzNNGEeX0W4

#

You can put it on the price if you move that metadata param out one level

#

Or even on the line item if you move it out two

silk agate
#

Oh, i didn't see it before because it was not on the invoice.paid event directly! So i think sync my products with Stripe would be better to identify them internally

#

I've tried and i got rejected

spiral hamlet
#

If you want it in the invoice.paid method I think putting it on the line items would make the most sense

silk agate
#

I retry

#

[subscriptionStripeService.createCheckout] Received unknown parameter: line_items[1][price_data][metadata]
[subscriptionStripeService.createCheckout] Received unknown parameter: line_items[1][metadata]

spiral hamlet
#

My apologies, you are correct. It would only be available on the product data