As this is a data call, you can access it using the 'Get data from an external API' Bubble expression. To retrieve the details regarding a subscription we use the 'Stripe - List Invoices For A Subscription' option that comes with the plugin.
Copy {
"object": "list",
"data": [
{
"id": "in_1KlJwhQ5aFtJWpjqlpODF6D5",
"object": "invoice",
"account_country": "NL",
"account_name": "Google",
"account_tax_ids": null,
"amount_due": 1000,
"amount_paid": 1000,
"amount_remaining": 0,
"application_fee_amount": 200,
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_reason": "subscription_create",
"charge": "ch_3KlJwhQ5aFtJWpjq18wGYGZa",
"collection_method": "charge_automatically",
"created": 1649194191,
"currency": "usd",
"custom_fields": null,
"customer": "cus_LSEPhpytrcMCWB",
"customer_address": {
"city": null,
"country": "NL",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"customer_email": "thimo1999@live.nl",
"customer_name": "test",
"customer_phone": null,
"customer_shipping": null,
"customer_tax_exempt": "none",
"default_payment_method": null,
"default_source": null,
"description": null,
"discount": null,
"due_date": null,
"ending_balance": 0,
"footer": null,
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_1KkYAsQ5aFtJWpjq/test_YWNjdF8xS2tZQXNRNWFGdEpXcGpxLF9MU0VQbWFhbFhsVzlvTGlCdk5pZVMxR3Myb1ZOVnFuLDM5NzM1ODY40200AezqWXgy?s=ap",
"invoice_pdf": "https://pay.stripe.com/invoice/acct_1KkYAsQ5aFtJWpjq/test_YWNjdF8xS2tZQXNRNWFGdEpXcGpxLF9MU0VQbWFhbFhsVzlvTGlCdk5pZVMxR3Myb1ZOVnFuLDM5NzM1ODY40200AezqWXgy/pdf?s=ap",
"last_finalization_error": null,
"lines": {
"object": "list",
"data": [
{
"id": "il_1KlJwhQ5aFtJWpjqM9XA7OjD",
"object": "line_item",
"amount": 1000,
"currency": "usd",
"description": "1 × Test product (at $10.00 / month)",
"discountable": true,
"livemode": false,
"period": {
"end": 1651786191,
"start": 1649194191
},
"plan": {
"id": "price_1KlJwQQ5aFtJWpjqT4aHf8dr",
"object": "plan",
"active": false,
"aggregate_usage": null,
"amount": 1000,
"amount_decimal": "1000",
"billing_scheme": "per_unit",
"created": 1649194174,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"nickname": null,
"product": "prod_LRp6KLhVtgnxsd",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1KlJwQQ5aFtJWpjqT4aHf8dr",
"object": "price",
"active": false,
"billing_scheme": "per_unit",
"created": 1649194174,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"nickname": null,
"product": "prod_LRp6KLhVtgnxsd",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 1000,
"unit_amount_decimal": "1000"
},
"proration": false,
"proration_details": {
"credited_items": null
},
"quantity": 1,
"subscription": "sub_1KlJwhQ5aFtJWpjqADLt8EyX",
"subscription_item": "si_LSEP4DDRphEd8V",
"type": "subscription"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/in_1KlJwhQ5aFtJWpjqlpODF6D5/lines"
},
"livemode": false,
"next_payment_attempt": null,
"number": "A1651EFE-0002",
"on_behalf_of": null,
"paid": true,
"paid_out_of_band": false,
"payment_intent": "pi_3KlJwhQ5aFtJWpjq1GJ04bL4",
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
},
"period_end": 1649194191,
"period_start": 1649194191,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"quote": null,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": null,
"status": "paid",
"status_transitions": {
"finalized_at": 1649194191,
"marked_uncollectible_at": null,
"paid_at": 1649194193,
"voided_at": null
},
"subscription": "sub_1KlJwhQ5aFtJWpjqADLt8EyX",
"subtotal": 1000,
"tax": null,
"tax_percent": null,
"test_clock": null,
"total": 1000,
"transfer_data": null,
"webhooks_delivered_at": 1649194191
}
],
"has_more": false,
"url": "/v1/invoices"
}