Request data from stripe by using stripe pricing table

hi bubblers
is there anyone with experince in setting up stripe to your bubble application by using stripes pricing table?

i have created a pricing table and intergrated it on my page with a HTML element.. i when i click it i can process a payment for a subscription.. all that works..

where im struggling is when i use an API workflow and want to request data from Stripe.. i how got the webhook to work.. and i also get the data when i run the workflow.. but i cant seem to actually identify the user that it have to put these data on..

NOTE: i have maked a similar post before where i only get told to not use plugins and do it all a different way.. i prefer to do it like this for now, so i would appriciate your help if you can lead me the right direction to figure out how to do it this way.. thank you :slight_smile:

the webhook that you used to communicate with stripe that retrieves result like your prcing table, you will use the “request_customer_email” as that is what you will use to identify the user.

Hi @tobixzybolumole
Thank you
My issue with that is that i can only retrieve customer_id from customer information

what other details do you want to retrieve?

1 Like

I want
subscription_id
product_id
Subscription_period_end
Subscription_period_start
Customer_id
And then also customer_email apparently to identify the user

you can easily get customer email from request_data body email when you use the webhook for creating a checkout session
You can get the start and end date when you initalize the api call for retrieveing a subscription



check stripe’s documentation, you will see all listed api calls there and also check this youtube video series on stripe subscription by Gregory John; https://youtu.be/6oxbet-wqwc?si=uca3PcWOPHsCCrJu

Thank you so much
Can i make two event in my webhook?
Both checkout.session and customer.subscription.created

Because in the checkout session i dont get the plan_id witch is important i also get for future rules in the application since i have 2 subscriptions and some content only is available with on specific subscription

yes, you can add more than one event in your webhook but i usually use one webhook per event as i am unable to carry out the necesssary workflow required for each webhook event
You can get the plan_id too

Aah that make sense.. will try it out when i come home

Oh sorry i meant product_id when i tried earlier with checkout session that info didnt got retrieved

to get the product is easy, my own use case is that i usually store my price_ids along with my product_id(occassionally) on an option sets ,
These values you can get from your stripe dashboard under your product catalogue,



then whenever a user subscribes to a plan, i will simply make changes to that user and associate the user with the necessary info

im trying to get the customers email, to identify witch user to put the data on but i cant chose email as an option

so i got it to work now.. thank you very much for you help..
i had to make 2 request.. one for check out session and another for subscription.update session to get the plan id..

struggle is that they both run at same time.. and i need the checkout session to run first and then the subscription.update session.. is there anyway i can set priorities on them so that the subscription.update first runs after the checkout.session?

you can still get with checkout session api call

the customer’s email is “object_customer_email”

I find it helpful to include a client-reference-id in the pricing table to help match the subscribing user to the data later retrieved regarding the subscription. See the section on handling fulfillment in Embeddable pricing table for subscriptions | Stripe Documentation.

the object_customer_email is blank for me so have to use object_customer_details_email

what would you use as data in the clien_reference_id? the users email?

i cant get the product id with a checkout session thats why i need to use 2 calls

{
    "id": "evt_1RRI67Gdaeoq0vQ5rO0yp0hf",
    "object": "event",
    "api_version": "2025-04-30.basil",
    "created": 1747854879,
    "data": {
        "object": {
            "id": "cs_test_a1RmbBbjMtFn7VRHc6IPXqjhOXpCSsCcALKk5DGacyDLTYMd8KagdzWLoq",
            "object": "checkout.session",
            "adaptive_pricing": null,
            "after_expiration": null,
            "allow_promotion_codes": false,
            "amount_subtotal": 49900,
            "amount_total": 49900,
            "automatic_tax": {
                "enabled": true,
                "liability": {
                    "type": "self"
                },
                "provider": "stripe",
                "status": "complete"
            },
            "billing_address_collection": "auto",
            "cancel_url": "https://stripe.com",
            "client_reference_id": null,
            "client_secret": null,
            "collected_information": {
                "shipping_details": null
            },
            "consent": null,
            "consent_collection": {
                "payment_method_reuse_agreement": null,
                "promotions": "none",
                "terms_of_service": "none"
            },
            "created": 1747854872,
            "currency": "dkk",
            "currency_conversion": null,
            "custom_fields": [],
            "custom_text": {
                "after_submit": null,
                "shipping_address": null,
                "submit": null,
                "terms_of_service_acceptance": null
            },
            "customer": "cus_SM065xBFAg7w5I",
            "customer_creation": "always",
            "customer_details": {
                "address": {
                    "city": "Stoholm Jyll",
                    "country": "DK",
                    "line1": "Vestergade 16C 1 Th",
                    "line2": null,
                    "postal_code": "7850",
                    "state": null
                },
                "email": "christian_bargmann@hotmail.com",
                "name": "4242424242",
                "phone": null,
                "tax_exempt": "none",
                "tax_ids": []
            },
            "customer_email": null,
            "discounts": [],
            "expires_at": 1747941272,
            "invoice": "in_1RRI66Gdaeoq0vQ5qslWfObm",
            "invoice_creation": null,
            "livemode": false,
            "locale": "da",
            "metadata": {},
            "mode": "subscription",
            "payment_intent": null,
            "payment_link": null,
            "payment_method_collection": "always",
            "payment_method_configuration_details": {
                "id": "pmc_1RCt5oGdaeoq0vQ50uOgKSq2",
                "parent": null
            },
            "payment_method_options": {
                "card": {
                    "request_three_d_secure": "automatic"
                }
            },
            "payment_method_types": [
                "card",
                "link",
                "paypal"
            ],
            "payment_status": "paid",
            "permissions": null,
            "phone_number_collection": {
                "enabled": false
            },
            "recovered_from": null,
            "saved_payment_method_options": {
                "allow_redisplay_filters": [
                    "always"
                ],
                "payment_method_remove": "disabled",
                "payment_method_save": null
            },
            "setup_intent": null,
            "shipping_address_collection": null,
            "shipping_cost": null,
            "shipping_options": [],
            "status": "complete",
            "submit_type": null,
            "subscription": "sub_1RRI66Gdaeoq0vQ5xHmkkMJw",
            "success_url": "https://stripe.com",
            "total_details": {
                "amount_discount": 0,
                "amount_shipping": 0,
                "amount_tax": 0
            },
            "ui_mode": "hosted",
            "url": null,
            "wallet_options": null
        }
    },
    "livemode": false,
    "pending_webhooks": 1,
    "request": {
        "id": null,
        "idempotency_key": null
    },
    "type": "checkout.session.completed"
}

this is the raw data i get with a checkout session