#dan_api

1 messages ¡ Page 1 of 1 (latest)

dusky starBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1248222467064074284

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

narrow mulch
#

In the above invoice, I ran this code:

        $invoice = \Stripe\Invoice::update('in_1POdUXIzvUgZFm3P21e4gKIx', [
            'transfer_data' => [
                'amount' => 40 * 100,
                'destination' => 'acct_1OrJJ2IwhPAfj3Zk'
            ]
        ]);

        $this->info('Invoice Updated: ' . $invoice->id);```
soft sigil
#

hi! I think it's just because for Subscriptions, you can only set application_fee_percent, and there's probably code in the Dashboard that just incorrectly assumes all Invoices have to be from subscriptions and formats the amount as a percentage

narrow mulch
#

This isn't a subscription, it's just a standard invoice

#

It seems to make the transfer fail too

#

So it doesn't seem to just be a formatting issue, but it's also actually stopping the transfer

soft sigil
#

I know it' s not a subscription, I was just explaining some context on why the dashboard code is probably choosing to show it that way(the code was probably written for subscription invoices and doesn't really take into account one-time invoices)

soft sigil
dusky starBOT
narrow mulch
#

I might be getting confused if I get an error or not for these, but it's confusing all round that it's showing as a percentage.

#

If we're happy it's just a formatting thing, then that's great.

#

I might be getting confused with some other invoices, whereby there's been a problem when the transfer amount is greater than the final payment amount on the invoice which was a discountint problem on my end.