#devparry
1 messages · Page 1 of 1 (latest)
Hi there!
hi
I don't think that's possible, Payment Links always create new Customer objects.
actually the user already take subscription which is trail one
What you could do is use a URL parameter,a s mentioned here: https://stripe.com/docs/payment-links/url-parameters#streamline-reconciliation-with-a-url-parameter
but that time we dnt take any payment details
could you please explain this to me how i can set here subscription data ?
So if I understand correctly: you create a Payment Link with a free trial subscription without colelcting a payment method. What exactly is your issue?
no no
user already take free trail
now we want to send him paid payment subscription link
You want to collect a payment method for the existing customer, so they can pay for their subscription when the trial ends?
https://buy.stripe.com/test_aEU29l6sg548eWsaEE
this is the new paid subscription link
2 months free with pay yearly. Having a link to your bio app on all your social accounts makes it easier for visitors to explore your business and products. [Basic] [GB02BAI]
there is no relation with free trail
we want user can take paid subscription
trail is different
in our system user can take multiple subscriptions at same time
we want if user done payment with payment link
Sorry I still don't understand your issue. Can you clarify exactly what you are trying to do, and which part is not working?
lets start with fresh
https://buy.stripe.com/test_aEU29l6sg548eWsaEE
we create this payment link and we have an existing user who already has a customer id under stripe.
- so when the user enters details such as email id name which is the same as the existing one.
2 months free with pay yearly. Having a link to your bio app on all your social accounts makes it easier for visitors to explore your business and products. [Basic] [GB02BAI]
the stripe creates a duplicate customer with same email id please have a look
how we can avoid this duplicate issue ?
👋 taking over for my colleague. Let me catch up.
We want to register the new transactions under the existing customer profile when an existing customers make a payment via the payment link
Payment Links have this limitation
each checkout session spawned from the payment link will generate a new customer
so how we counter this
unfortunately using Payment Links you can't
instead you need to create Checkout Sessions yourself
so that when existing user done payments new transactions under the existing customer profile
and pass in the Customer ID
okay could you please help me, how I can do this ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
will this work for one-time payments or for subscriptions ?
$stripe = new \Stripe\StripeClient('sk_test_kUEKa5cQJKm0pYSInlvmEHSL0084KLYEX1');
$stripe->checkout->sessions->create([
'success_url' => 'https://example.com/success',
'line_items' => [
[
'price' => 'price_H5ggYwtDq4fbrJ',
'quantity' => 2,
],
],
'mode' => 'payment',
]);
what type of data i have to pass so that stripe knows this session is for existing user only ?
both, depending on the mode you use
if you use mode payment, then it's for a one-time payment
if you use mode subscription, then it's for a subscription
okay then what params i have to set ?
okay it
so then this will return us a URL same as we get while creating a payment link from Stripe?
yes
one thing need to know
sure
will stripe return any post or get data under success url ?
because after the success I we also need to store data on our local database
it's best not to rely on the success URL but rather use webhooks
or any other way i have to sync data with stripe
please correct me if I am wrong
according to the documents :
when the session is complete we have to use the web-hooks based on the session event.
checkout.session.completed This returns the whole recently created subscription data and we can easily save the subscription data on our local database
@hearty wolf
yes that's correct