#Jun Takeshita

1 messages · Page 1 of 1 (latest)

green carbonBOT
wanton marten
#

Hi there, there's no customer param for after_completion.

Can you tell me what you want to achieve here? so that I can advise the best possible solution.

chrome oar
#

I tried to create the following payment flow using Stripe links api,

  1. A customer come to my site
  2. My backend service create the customer data and hash data
  3. And create link using api and set the hash to after_completion with redirect url
  4. the site shows payment link and enter payment data
  5. the customer payment completed and customer browser access my site as the redirect url
  6. Then my backend site update the customer data
    But the above way, I can't stop the customer payment when the customer selected not one time payment and quit our service

Actually, I think the flow is not matched normal payment links usage.....
So let me know your payment flow for the above my case
I would like to no management for any customer payment data example card number, email, and their address

wanton marten
#

But the above way, I can't stop the customer payment when the customer selected not one time payment and quit our service -> I don't quite understand this sentence, can you share with me an example so that I can better understand?

chrome oar
#

well, I would like to control my customer data other than payment detail

#

Actually I want to know price, product name, and one time or not

#

it

#

It's enught the above items

wanton marten
#

Sorry I don't really understand you. Can you tell me an use case which you want to stop your customer from payment?

chrome oar
#

Sorry, my mentioned puzzled you
I would like to know payment links normal usage fast
Actually, I create payment link each customer payment... if followed my flow

wanton marten
#

The payment link is designed to be reused among your customers, you should just create one and let all your customers use it.

#

I believe Checkout Session is more suitable if you intend to create dedicated one for each of your customer

chrome oar
#

I see I thought it

#

Let me think...

#

Do you have any example to use Checkout sessions for my payment flow?

wanton marten
chrome oar
#

👀

#

well, can I use payment links for checkout session url?

wanton marten
#

Payment Link and Checkout session are two different products and I don't see how you can use a payment link in checkout session

chrome oar
#

I understood cancel.html and success.html in sample source code are redirect urls
Is it correct?

#

And can I use price id in payment link product also

brisk citrus
#

Hey! Taking over for my colleague. Let me catch up.

brisk citrus
chrome oar
#

def get_checkout_session_link(self, id: int, pricetype: int): price = self.__set_price_id(pricetype) obj = stripe.checkout.Session.create( line_items=[{"price": price, "quantity": 1}], mode='payment', success_url=f"{{completed_url}}success.html", cancel_url="{{completed_url}}cancel.html", ) return obj.session.url

brisk citrus
chrome oar
#

but happend the following error for this test code

#

stripe.error.InvalidRequestError: Request req_Vg6ZEBMvzta4tr: Not a valid URL

brisk citrus
chrome oar
#

Can I append url parameters to each recirect url?

#

oops, thanks

#

I got payment site, thanks
by the way, how can I to confirm the customer data?

#

hello?

#

well, test code was success
but redirect url doesn't have any parameters...
I just understand my data, not stripe cutomer hash? (customer id)

brisk citrus
chrome oar
#

I see
I should save checkout session id for each customer payment control

#

How to stop customer payment using the checkout session?
I would like you show the sample

chrome oar
#

I see
I got understand all of usage for my user service flow
thanks