stripe-firebase-extensions icon indicating copy to clipboard operation
stripe-firebase-extensions copied to clipboard

Feature Request: Custom fields in Stripe Checkout

Open plungarini opened this issue 1 year ago • 4 comments

Feature request

  • Extension name: firestore-stripe-payments

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

plungarini avatar Sep 15 '23 15:09 plungarini

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": "[email protected]", "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" }

SavvyBud avatar Oct 10 '23 12:10 SavvyBud

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

5inline avatar Oct 23 '23 19:10 5inline

@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?

dvdoliveira avatar Nov 30 '23 07:11 dvdoliveira

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.

rodrigoescandon avatar Feb 02 '24 01:02 rodrigoescandon