#amcleod83_api

1 messages ยท Page 1 of 1 (latest)

full pewterBOT
#

๐Ÿ‘‹ 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/1295316801525383168

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

fluid oak
#

๐Ÿ‘‹ happy to help

hollow hemlock
#

Hi ๐Ÿ˜ƒ

fluid oak
hollow hemlock
#

I don't think so

#

we have a portal that is organsied by Agencies - an agency can have a team of users .

fluid oak
#

you want to limit your customer to one subscription from what I've understood in your original message

hollow hemlock
#

if User A creates a payment method, with their card, name and address. the we need to create a custerom in stripe to attact to the new payment method

#

i want to limit the Agency to 1 subscription

fluid oak
#

the agency is a customer right?

hollow hemlock
#

yes i suppose the agency could be recognised as a customer

#

if that is the case though... how can i retain name and address of a payment method (if it is not the same as the Agencies customer)?

fluid oak
#

how are you integrating with Stripe? I mean how are you creating the Subscriptions? using Checkout Sessions? or Custom Flow?

hollow hemlock
#

a custom flow

fluid oak
#

you can have multiple payment method with different billing details for each customer

hollow hemlock
#

when a user of the agency creates a payment method i create a subscription and attacth it to the customer (that i create when creating a PM)

#

you can have multiple payment method with different billing details for each customer
i think this might help me out... can we explore this a little

fluid oak
#

when a user of the agency creates a payment method i create a subscription and attacth it to the customer (that i create when creating a PM)
what happens when another user comes in

hollow hemlock
#

.

#

when a new user comes in.. if they add a payment method, IN STRIPE a new CUS and a new PM is created (custom workflow)

fluid oak
#

but that shouldn't happen since as you said the agency is the customer right?

#

unless I'm missing something here

full pewterBOT
hollow hemlock
#

this is where i could be going wrong. I thought in order to capture the identity of the payment method i had to create a customer . eg ..

Agency - (cus_123, John Doe, 1 New Street, 73737)
PM (pm_abc, cus_123, 4242, 05/27)
Customer (cus_456, Sally Sue, 2 Orange Road, 92929)
PM (pm_cde, cus_456, 3232, 09/26)

SUB(cus_123, default_pm = pm_abc)

#

as i am working at the moment i create cus_456 and pm_cde at the when i want add a new PM

#

How can i have 1 customer with multiple pamyment methods and retain the details like name and address for the PM

daring panther
#

well a Customer object can have an address and each of their PaymentMethod can have a billing_details.address, they can be different values.

hollow hemlock
#

ah

#

i missed that detail

#

So i could have a set up like this...

Agency - (cus_123, John Doe, 1 New Street, 73737)
PM (pm_abc, cus_123, 4242, 05/27, Sally Sue, 2 Orange Road, 92929)
PM (pm_cde, cus_123, 3232, 09/26, John Doe, 1 New Street, 73737 )
PM (pm_xyz, cus_123, 3232, 09/26, Greg James, 10 Bond Street, 73737 )

SUB(cus_123, default_pm=pm_abc)

daring panther
#

sure