invertase / stripe-firebase-extensions

Repository of Firebase Extensions built by Stripe.
https://firebase.google.com/products/extensions
Apache License 2.0
431 stars 162 forks source link

Feature Request: Custom fields in Stripe Checkout #562

Open plungarini opened 11 months ago

plungarini commented 11 months ago

Feature request

Is your feature request related to a problem? Please describe.

I cannot set custom fields to my Stripe Checkout

Describe the solution you'd like

I would like to set custom fields on my checkout page

Describe alternatives you've considered

I have not considered any other option

SavvyBud commented 10 months ago

Hello, I am creating a checkout object with the following payload, but I don't see the custom field in the invoice that is generated. Does it work in test mode and am I doing something wrong? Any help would be appreciated.

{ "client": "web", "mode": "payment", "success_url": "http://localhost:5000/success?transaction_id=7258db00-2e20-1d31-b4ac-c338bddd4e91", "cancel_url": "http://localhost:5000/cancel?transaction_id=7258db00-2e20-1d31-b4ac-c338bddd4e91", "line_items": [ { "price": "price_1Nz3gmDusMLDomPA3Cd9bi99", "quantity": 1 } ], "phone_number_collection": { "enabled": true }, "invoice_creation": { "enabled": true, "invoice_data": { "custom_fields": [ { "name": "prod-1", "value": "BG - 1.14" } ] } }, "customer_email": "xxxx@gmail.com", "client_reference_id": "7258db00-2e20-1d31-b4ac-c338bddd4e91" }

The firebase extension send the following payload to Stripe, omitting the invoice_creation section completely. This creates limitations with "checkout" invoice/receipts creation.

{ "line_items": { "0": { "quantity": "1", "price": "price_1Nz3gmDusMLDomPA3Cd9bi99" } }, "phone_number_collection": { "enabled": "true" }, "allow_promotion_codes": "false", "customer": ["cus_Omd76ntg3XXXX"](https://dashboard.stripe.com/test/customers/cus_Omd76ntg34XXXX), "cancel_url": "http://localhost:5000/cancel?transaction_id=7258db00-2e20-1d31-b4ac-c338bddd4e91", "billing_address_collection": "required", "locale": "auto", "mode": "payment", "success_url": "http://localhost:5000/success?transaction_id=7258db00-2e20-1d31-b4ac-c338bddd4e91", "client_reference_id": "7258db00-2e20-1d31-b4ac-c338bddd4e91" }

5inline commented 10 months ago

It would be helpful if the fields were in parity with the documented fields: https://stripe.com/docs/api/checkout/sessions/create

dvdoliveira commented 9 months ago

@dackers86 since the most recent changes for the extension firestore-stripe-payments were authored by you, do you know if this feature is in the roadmap or list of priorities for this extension?

rodrigoescandon commented 6 months ago

I am having the same issue. I am trying to include capture method: 'automatic' in my session to put a hold on a payment, but because the function only passes some attributes, I can't.