#zlf_api

1 messages ¡ Page 1 of 1 (latest)

worldly coralBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313044119836168212

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

chilly torrent
#

What do you mean by a "trial pull-up payment control" ?

tawny basin
#

A component on a mobile APP that users use to make payments

chilly torrent
#

So basically you want to collect a payment method from your customer, and use it to create a subscription?

tawny basin
#

The API document says that the customer does not need to choose any payment method, but now we have a demand for the user's payment method, is there any way?

chilly torrent
#

The payment method is collected, you can pass it as the default_payment_method when creating a subscription.

#

No, use subscriptions API directly

tawny basin
#

Do you mean using Stripe Checkout to create a subscription with a trial period?

chilly torrent
#

No, use subscriptions API directly

#

When you use a subscription mode checkout session, the checkout page collects a payment method from your customer. Since you already collected a payment method, you can use the subscriptions API directly to start a subscription

tawny basin
#

My understanding is that first, the checkout page is used to collect users' payment methods, and then the collected payment methods are directly called to the subscription creation interface through the default_mayment_method field

chilly torrent
#

Are you referring to a setup mode checkout session?

tawny basin
chilly torrent
#

Sure, it's just that unlike checkout session, the mobile payment sheet doesn't create subscription under the hook, so you need to call subscriptions API directly to create one.

tawny basin
#

Let me explain my understanding of the process. If there are any issues, please point them out. Firstly, when the user creates a subscription using our application, a checkout page will be launched on the application. Then, the user inputs the payment method, and the app passes the payment method to the server. The server then directly calls the subscription interface to create a trial subscription

chilly torrent
#

The component in your screenshot

chilly torrent
tawny basin
#

I understand the functionality, but I would like to know the specific operation process. Can you explain it to me? What should I do to fulfill my needs

chilly torrent
#

Two steps

  1. Use the setup mode payment sheet to collect a payment method
  2. Pass the newly collected payment method to default_payment_method when creating a subscription through /v1/subscriptions API
tawny basin
chilly torrent
#

yes

tawny basin
#

Let me confirm again, these are all trial subscription features we're talking about, right

chilly torrent
#

Collecting a payment method isn't designed just for trial subscriptions.

#

You can also collect a payment method for one-off payments

#

I'd suggest you follow the integration guide to bulid up your integration, feel free to visit this discord server anytime when you have questions

tawny basin
#

Okay, thank you very much

chilly torrent
#

No problem!