#vanith-api-versions

1 messages · Page 1 of 1 (latest)

inner wadiBOT
copper scroll
#

hi

#

when try to fetch customer source, subscription object not showing in the response

chilly breach
#

When you retrieve the Customer you have to expand subscriptions to see all their subscriptions

copper scroll
#

source?

#

{
"id": "cus_PDFDK1wjjJVGqO",
"object": "customer",
"address": null,
"balance": 0,
"created": 1702936296,
"currency": null,
"default_source": null,
"delinquent": false,
"description": "Customer for test data43",
"discount": null,
"email": "testdat43@gmail.com",
"invoice_prefix": "BC1C219A",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": { "platform_customer": "cus_PDFDJOvFhy4dCs" },
"name": "test data43",
"next_invoice_sequence": 1,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}

#

sample

#

response

#

source & subscription key is not thr

chilly breach
#

That customer doesn't have a subscription at all so I'm not sure why you're expecting one

#

If you want to see their sources you have to expand it

copper scroll
#

if i set api verison
stripe::setApiVersion('2019-03-14');
response getting source,subscription

#

if i try to change stripe::setApiVersion( '2023-10-16' ); that time source,subscription not showing

chilly breach
#

Yeah, that's expected when changing API versions - we make a lot of breaking changes in each version so the set of params you get back will change with each version