#SouffleAuChocola

1 messages · Page 1 of 1 (latest)

shadow bearBOT
orchid dome
#

hello! can you share the Checkout Session object that you're trying to access?

neat umbra
#

yes , but how?

orchid dome
#

have you already created the Checkout Session Object?

neat umbra
#

Let me explain you the flow , I am using a payment link to create a subscription. Inside that payment link I've set up some custom fields. In my API I am listening to subscription created events and I would like to know the value of those custom fields.

#

that indicates the organization under which the user will be registered in.

orchid dome
neat umbra
#

the documentation is saying that I can access those values by getting those session with the subscription ID.

#

but when I do that , no custom fields are displayed

orchid dome
#

can you share the Subscription id? and which documentation are you referring to, can you share the URL?

neat umbra
#

yes

#

sub_1MjeUbJHCIFWObpfRNF9gHAk

#

"retrieve custom fields for a subscription"

orchid dome
#

can you share your code to attempt to retrieve the custom field data?

neat umbra
#

of course the value won't be hardcoded there

orchid dome
#

that just retrieves the Checkout Session, you still need to access the custom_fields

#

where's your code to do that?

neat umbra
#

nowhere

#

I've been debugging and there is not custom fields on what I am getting from that sessions

orchid dome
#

what do you get from sessions in that case, can you share the object?

#

for context, you should have received an array of objects from sessions, and you should be accessing the first object in that array

neat umbra
#

yes

#

but that object DOES NOT contain the required custom fields

orchid dome
#

can you share the object?

neat umbra
#

{<Stripe.Checkout.Session@22904234 id=cs_test_a1CBZ22oWsZKDNeksRx5hvhzQCtvbLta8SrD5Sovi6EMpsLIT1OHJlImSL> JSON: {
"id": "cs_test_a1CBZ22oWsZKDNeksRx5hvhzQCtvbLta8SrD5Sovi6EMpsLIT1OHJlImSL",
"object": "checkout.session",
"after_expiration": null,
"allow_promotion_codes": false,
"amount_subtotal": 0,
"amount_total": 0,
"automatic_tax": {
"enabled": true,
"status": "complete"
},
"billing_address_collection": "auto",
"cancel_url": "https://stripe.com",
"client_reference_id": null,
"consent": null,
"consent_collection": {
"promotions": "none"
},
"currency": "gbp",
"customer": "cus_NUdmcrl6af8vkt",
"customer_creation": "if_required",
"customer_details": {
"address": {
"city": null,
"country": "RO",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},...

#

...
"email": "remus.galea@qubiz.com",
"name": "Remus",
"phone": null,
"tax_exempt": "none",
"tax_ids": []
},
"customer_email": null,
"expires_at": 1678435569,
"line_items": null,
"livemode": false,
"locale": "auto",
"metadata": {},
"mode": "subscription",
"payment_intent": null,
"payment_link": "plink_1Mj0h4JHCIFWObpfpZgCdGhQ",
"payment_method_options": {
"acss_debit": null,
"boleto": null,
"konbini": null,
"oxxo": null,
"us_bank_account": null
},
"payment_method_types": [
"card",
"bacs_debit"
],
"payment_status": "paid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": "seti_1MjeUaJHCIFWObpfPqsCq2Ok",
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
"shipping_rate": null,
"status": "complete",
"submit_type": "auto",
"subscription": "sub_1MjeUbJHCIFWObpfRNF9gHAk",
"success_url": "https://stripe.com",
"tax_id_collection": null,
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0,
"breakdown": null
},
"url": null
}}

orchid dome
#

gimme a while to take a look

#

and right now you're using v39.107.0

neat umbra
#

so I should upgrade the nugget package?