#PSN - PaymentLink

1 messages ยท Page 1 of 1 (latest)

thick ether
#

Hi there!

spare pumice
#

Hi

thick ether
#

Give me a few minutes to try this.

spare pumice
#

Sure

thick ether
#

You need to create a Price with custom_unit_amount in order to have custom amounts in PaymentLink

spare pumice
#

So first i need to pass enable true

#

and then the amount right?

#

Could you share an example request structure here>

#

?

thick ether
#

In Node.JS it would look like this:

const price = await stripe.prices.create({
  currency: "usd", 
  custom_unit_amount: {
    enabled: true,  
    maximum: 10000,  // optional
    minimum: 1000,  // optional 
    preset: 5000,  // optional 
  },
  product: "prod_xxx"
});

Then pass that price ID when creating the PaymentLink.

spare pumice
#

I still need to pass product?

#

My use case is :

I have custom priced products and I want my customers to pay using link

thick ether
#

I would recommend to:

  1. Create a product
  2. Create a price using that product
  3. Create a payment link using that price
    Note that you can do all of that in the PAI or directly in the dashboard
spare pumice
#

Let me try this then.

#

Thanks!

#

PAI?

#

API :P?

thick ether
#

Woops, API indeed ๐Ÿ™‚

spare pumice
#

But will it clutter the console products page?

#

Like every time I'm creating a payment link, a product will be created right?

thick ether
#

It depends. If you reuse the same product ID, then no new product will be created.
Also note that once you create a PaymentLink, it can be reused many times, so you don't have to create a new one.

spare pumice
#

oh ok

thick ether
#

Just to clarify my previous message:

  1. Create a product once
  2. Create a price using that product once
  3. Create a payment link using that price once
  4. Then send the payment link URL to as many user as needed
spare pumice
#

Cool!

#

I do have one more query

#

I have something similar happening for user subscription also

#

Like user can choose the payment cycle (monthly or yearly)

#

and choose a plan based on that

#

Like for basic monthly plan it will be 5$ every month.

#

But this can be overridden in the app

#

Like for first 2 months the admin can charge 2$ and last 3 months admin can charge 4$

#

Like the price is fully customisable.

#

Is this achievable using the same method?

#

or is there a better way?

#

@thick ether

thick ether
#

Do you mean the admin can change the price of a specific subscription after the subscription was created?

spare pumice
#

Yes before payment ofc

#

Mostly admin will be setting the billing plans and stuff

#

user/customer will be having a call with sales team and basically the team will negotiate a plan.

#

It's not like user can choose the custom amount.

thick ether
#

I'm still not sure I understand.
Do you want the admins to set the price for the subscription, and then create the Payment Link for that price? Or do you want customers to start a subscriptions with a Payment Link ,and then later update the price?

spare pumice
#

Just think of it like this.

Assume an admin from NetFlix team setting up a custom subscription plan for you. Like first 3 months you only have to pay 15$ and the 4th month onwards it will be 20$ .

#

Basically can we create custom amount for subscription and create future invoice based on that?

thick ether
spare pumice
#

Ok

thick ether
#

Like first 3 months you only have to pay 15$ and the 4th month onwards it will be 20$ .
If you only need to change the price once (like in your example), then you could also use coupons. For example have a 20$ per month subscription with a 5$ off for the first 3 months. https://stripe.com/docs/api/coupons

spare pumice
#

ok

queen axle
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

spare pumice
#

Hi

#

The user can edit the payment created using the above method?

#

@queen axle

queen axle
#

What do you mean by 'edit the payment'?

spare pumice
#

User is able to change the amount

#

@queen axle

#

When clicking on payment link

queen axle
#

I'm confused, my colleague was talking about subscription schedules

#

And as they stated, they don't work with Payment Links

#

So what are you actually asking here?

queen axle
spare pumice
#

Sorry I was AFK

#

No, Not about Subscription schedule

spare pumice
#

@queen axle

queen axle
#

Ok, then what is the question about that? That's just a generic PL creation flow

spare pumice
#

The user is able to change the payment amount when clicking on that link.

#

I can see a change amount button

#

see this link

#

@queen axle

queen axle
#

Just use a different Price in the Payment Link

spare pumice
#

Ok thanks