#brometheus_api

1 messages ยท Page 1 of 1 (latest)

glacial forgeBOT
#

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

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

vague crescent
#

Hi, it is not possible to share payment methods between customers like you imagined. You'd track this on your end, and if the customer exists you use that customer id to make the charge. You'll need to consolidate these on your end if you already have multiple customers with the same email address.

ivory plinth
#

We have some other limitations that mean we can't combine the Stripe Customers in this case (one of the customers might evolve into a multi-member organization, not just one human)

#

If we have the requirement that we need two separate Stripe Customers, there's not any way to clone the payment method? (this would be preferred over 1 shared payment method)

vague crescent
#

What does ' multi-member organization' mean here? Are you saying you have Connected Acconts and you're asking if you clone the payment details between these accounts?

ivory plinth
#

Sorry, on our end we have something like:

    1. Single accountA belonging to one human
    1. That human creates another single account B
    1. Then account B is potentially later upgraded to a multi-human account (still with one Stripe Customer)
#

so A and B can't share a Stripe Customer

#

This is all on one Stripe Account for our business

vague crescent
#

What do you mean by 'Single accountA'? Is this a connected account, starting with acct_ or are you referring to customers, starting with cus_?

ivory plinth
#

In this case, "Account A/B" is a non-Stripe concept, stored in our own system's database

#

I can share a specific example if it would help?

vague crescent
#

So how do those map to Stripe objects?

#

Yes, examples would be helpful

ivory plinth
#
  1. Dave (human) dave123@gmail.com signs up on our website. It creates a new account in our system - "Dave's Account". They enter payment details, at this time we create a Stripe Customer "Dave's Account", and payment method is configured with SetupIntent flow.
  2. Dave (human) dave123@gmail.com signs up for a second account on our website. It creates a new account in our system - "Dave's Account 2". We create a new Stripe Customer "Dave's Account 2". <Here we would like to prompt the user whether they would like to reuse the same payment method from "Dave's Account" or add a new one>.
vague crescent
#

Ah, yeah that is not supported. The recommended approach would look something like:

1/ Dave (human) dave123@gmail.com signs up on our website. It creates a new account in our system - "Dave's Account". They enter payment details, at this time we create a Stripe Customer "Dave's Account", and payment method is configured with SetupIntent flow.

2/. When Dave (human) dave123@gmail.comcomes back to your website, you retrireve the customer ID instead of creating a new customer. Then, <Here we would like to prompt the user whether they would like to reuse the same payment method from "Dave's Account" or add a new one>.

ivory plinth
#

We have some other limitations on our side that force separate Stripe Customers in this case, so I guess we're out of luck

#

ok, thanks

vague crescent
#

Sure

ivory plinth
#

I have a completely unrelated question!

We're having an issue where we would like to use hardcoded product ids for credit line items on invoices, but don't know how to do this

the /invoiceitems endpoint - it appears Stripe explicitly rejects attempts to include product IDs on line items with negative amounts.

When using the price-data.unit-amount parameter with negative values (which is necessary for credits), Stripe appears to prevent the inclusion of product IDs unless the price-data.unit-amount values are positive. To work around this, we send the negative value line items with no product ID to ensure they enter Stripe, but as such they generate product IDs dynamically

#

Can you confirm whether this is the behavior, and whether there's any recommended workaround?

#

๐Ÿ‘‹ are you still there?

vague crescent
#

Ok, so you're trying to pass a negative balance? Why? What is your use case?

#

If you can share more about your use case, I'm happy to talk through your current solutions. With the limited information, that would work.

#

Are you still here?

ivory plinth
#

sorry, yeah I'm here again

#

Negative balances on line items are for credits, for a credit system we control on our end

#

an example invoice today

vague crescent
ivory plinth
#

Stripe Customer balance doesn't work for us, we have a lot of strict rules about in which cases credits are applied to which invoices, and different classes of credits with different rev rec treatment

vague crescent
#

In that case, what you have works

ivory plinth
#

Right, it works, but we don't know how to set up an invoice like this where we can use a specific product ID for the free credit grant line item

vague crescent
#

you can't have a negative price

#

You'll track that in your own system

ivory plinth
#

Doing this, it does result in product being generated, the line item does end up tied to a product id

#

it's just a new dynamic product for each invoice & each line item

#

the product that was created when we click through:

#

I guess I would like to submit a feature request then, that you could pre-create a specific product which looked exactly like this, we don't need to store any prices on it. And then we can reference this product id from that line item when configuring the credit line item

vague crescent
#

Yeah, the product gets created for in line items. However, you can't reuse that id

#

I will share this feedback with the team. Thank you

ivory plinth
#

The generated price object does actually have a negative price stored on it as well:

{
"id": 
"price_<id>"
,
"object": 
"price",
"active": 
false,
"billing_scheme": 
"per_unit",
"created": 
<ts>
,
"currency": 
"usd",
"custom_unit_amount": 
null,
"livemode": 
true,
"lookup_key": 
null,
"metadata": {},
"nickname": 
null,
"product": 
"prod_<id>"
,
"recurring": 
null,
"tax_behavior": 
"unspecified",
"tiers_mode": 
null,
"transform_quantity": 
null,
"type": 
"one_time",
"unit_amount": 
-15771,
"unit_amount_decimal": 
"-15771",
}
#

can you share me a link for this feature request so I can share it with my Stripe technical account manager to help get it prioritized?

vague crescent
#

I can't share an internal link no. Sharing the feedback does not guarantee that it will be built out.

#

I just want to set correct expecations

ivory plinth
#

Right, agreed - just want to let my technical account manager know that I've requested this. Maybe I can share the discord convo link to them

vague crescent
#

That works, thank you for the feedback

ivory plinth
#

thank you!

vague crescent
#

Sure