#User 1
1 messages · Page 1 of 1 (latest)
Hi, you do not need to write in the main channel. You can ask a quesiton on the same thread.
This is a separate question
That is fine.
If you passed custom fields when you created the Payment Link, you'd find this on the Payment Link object. You can look at the repsonse: https://stripe.com/docs/api/payment_links/payment_links/retrieve
I don't want to retrieve the payment link itself. I'm asking if when a user submits data to custom fields via payment links, if that data is stored in Stripe somewhere.
Yeap, can you share the specific payment link id so I can show you where it is?
I'm specifically trying to retrieve this information when a user canceled a subscription if that is helpful
Can you share the specific request id with me so I can show you? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
This is the subscription delete request:
req_FW7hPcsg6Fhufg
This is the payment checkout request:
req_tQ2t6zXnE1qm9D
I see you're trying to get this information from the Subscription deletion request. That is not possible as the customer_fiels parameter belong to the Payment Links object which relies on Checkout Sessions object under the hood.
So how can I obtain it then
Would it be better to associate the information with the customer somehow?
You'd retrieve the payment like like I suggested earlier. Alternatively, you can look at the response from the Payment Link creation request, and save that information as a metadat on the Subscirption object by updating the Subscription: https://stripe.com/docs/api/subscriptions/update#update_subscription-metadata. Then, when you delete the Subsciption, you can look at the metadata.
Are subscriptions individual to each customer who buys?
Or at least, the information stored inside of them?
Yeap, that is correct. You can loearn more about how subscirptions work here: https://stripe.com/docs/billing/subscriptions/overview
Which of these two options would you recommend
This is what I would recommend and also clarifying myself.
1/ You'd create the Payment Link, and under the hood Stripe uses Checkout Session and stores that custom field on that object .
2/ Then, you'd want to listen to checkout.session.completed event: https://stripe.com/docs/api/events/types#event_types-checkout.session.completed and attain the custom fields that your customer provided.
3/ You then, you'd want to add this as a metedata on the Subscription object by updating the Subscription: https://stripe.com/docs/api/subscriptions/update#update_subscription-metadata.
Okay sounds good. Another clarifying question. When a user fails to pay for the subscription, or cancels their subscription, I should be able to get that metadata from customer.subscription.deleted, correct?
Yes, that is correct.
Is there a case where a user would not pay for the subscription and the subscription wouldn't automatically be deleted?
Also, when someone buys my monthly subscription, will they be charged the monthly price immediately after buying and then again every month after that?
Are you able to clarify what you mean with this?
Also, when someone buys my monthly subscription, will they be charged the monthly price immediately after buying and then again every month after that?
Yes, that is correct.
I'm saying, if the user doesn't actually pay for the subscription, the subscription will be automatically deleted, correct?
Hmm, I recommend that you review this document, https://stripe.com/docs/billing/subscriptions/overview to learn about how Subscription works. If the invoice has not been paid, the subscription status can change: https://stripe.com/docs/api/subscriptions/object#subscription_object-status to past_due but you'd need explicitely cancel teh Subscription to delete.