#vzhuh007
1 messages · Page 1 of 1 (latest)
Can you share the in_xxx ID?
it's a test data
in_1OTbUKJaf89hC41IFXvYEZi9
When you 'balance', what specifically do you mean? On the cus_xxx object?
yes, exactly
cus_P6ZrmrYOAzQX0M - has 40$ balance right now
I want to update subscription from it even if something wrong with payment method
Interesting I'd of expected that to work given that we normally automatically apply any credit balance
Checking
I expect the issue is is that there is an associated payment/pi_xxx with the invoice so we can't apply the credit in this case. What you're likely going to do is:
- Call
/paywithpaid_out_of_band: https://stripe.com/docs/api/invoices/pay#pay_invoice-paid_out_of_band - Decrement the customer balance accordingly to reflect the 'payment': https://stripe.com/docs/api/customer_balance_transactions/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so do you mean 2 steps, I can finish invoice without payment directly and after - decrease a balance, correct?
OK, got it! Thank you very much, gonna try