#Rashmi Ranjan Singh

1 messages · Page 1 of 1 (latest)

signal crystalBOT
amber pawn
#

hello! Is this for a payment for a Subscription?

ruby olive
#

yes

amber pawn
#

you can list all Subscriptions on a customer : https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer, loop through them, and find the Product in the items.data.price.product : https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-price-product

signal crystalBOT
ruby olive
#

my requirement - I will assign a product to a customer and that customer will see all the prices against that product
e.g - I can assign a product-1 to customer-1 and product-2 to customer-2
so only customer-1 will fetch all the prices against that product-1 and same for customer-2
so I need an API where I get the product-1_id against that customer-1
now no subscription happens only I will create a product and create a customer and assign that product to that customer for subscription(in future) and fetch the product.
So how i will assign that product and fetch it from a customer?

quartz thorn
#

What do you mean by "assign a product to a customer"? Don't think there is such an API

ruby olive
#

for subscription, I need to assign a product to a specific customer so when that customer makes a subscription only he will see the prices against that product

amber pawn
#

If you're creating the Subscription, your application would be the one that decides what prices to offer to the customer to select wouldn't it?

#

i'm not sure how this would involve the Stripe API specifically. You would typically store what prices that you would want to offer to the customer on your own server / backend

ruby olive
#

in stripe, you have a product section where I create a product and in that product, I create a price from your Stripe dashboard.
I need to attach this product to a customer so in the future only this customer only see this product's prices so he can choose when he will going to subscribe.

amber pawn
#

for context, Stripe doesn't allow you to restrict products for a particular customer. If you want to do that, you need to implement that logic on your own application