#akdj16 - Apply customer balance
1 messages ยท Page 1 of 1 (latest)
Hi! thank you ๐
Okay what is the current state of the error?
Which error are you getting now? And can you share the request ID?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I did a lot test requests, maybe the customerID is useful too? cus_M8TLxrH9cI7ai2
the last request is req_hqJTEFIaEUVYQx
also I think I didn't succeed to set paymentIntent status to 'requires_action'
I'm sorry I am somewhat confused by this wording.
I'm sorry too..
what I try to said is, the first time when I tried to use the applyCustomerBalancecall, I received the error about the PaymentIntent status requires_confirmation is incorrect.
Then i did a lot of attempts to change to status, but I never succeed
Can you share the request that returned that error?
yes, here is it
I'm sorry, the request ID. We cannot really work with a screenshot of code
this one, req_47l28wfsAzQIBi ?
That request did not result in an error
but I have only this two requests... and there is the error in return of the script
See the 200 OK on the left? That means this request was successful and did not result in an error. Are you looking at your Test mode data?
yes
But I want to back up and suggest you review Payment Intents in general. Because the status can only be changed by taking specific actions. You cannot manually update the status.
https://stripe.com/docs/payments/intents
Indeed it not result in error, but why my script throw an error?
Your script is making a different request. That is clear from the error message
Hi there ๐ taking over for snufkin
Give me a few minutes to get caught up.
Hi! So I would recommend reviewing the Payment Intent docs that snufkin posted, because the error says exactly why it was thrown and you would know what to do from here if you understood how Payment Intents transition through statuses.
If you have any questions specifically about behavior, I can definitely help with those. Mostly it's hard to explain something that is already very well-documented in a Discord thread
I read this doc, but I don't know how to enable the 3D secure process
is it the only action that can be set for using applyCustomerBalance?
ok I found how to use 3D secure, but is it the only action?
What do you mean "the only action"?
in the error, it said "You may only apply customer balance to a PaymentIntent with a status of requires_action" and I only find 3d secure as an action, so is it the only one available action?
Action and status are 2 different things
I means, is it the only one action that can change the status to requires_action?
What's the payment method you're looking at? Do you have an ID?
never mind, I just did a new attempt with
payment_method_options: {
card: {
request_three_d_secure: 'any',
},
}
in the paymentIntent creation, and I get the same result.. status still is requires_confirmation
my initial aim, is I want to use the customer balance
the paymentMethod id : pm_1LQEMdB5c8xuItaNHkn2p2Ic
Sorry I meant, which payment intent are you looking at?
by running the script I created a lot... pi_3LQEMdB5c8xuItaN01QJsap6 is the last one
3DS is only going to be required if there is a Payment Method, so I think you may need to create a Payment Intent without an attached Payment Method. OUr docs talk about how to do this here: https://stripe.com/docs/payments/customer-balance#make-cash-payment
you have to specify
payment_method_data: { type: 'customer_balance', },
on the payment intent when you create it and only pass it a customer id
Ok let me try ๐
Thank you! I succeed to applied the customer balance to the paymentIntent by removing the attached payment_method, but the applyCustomerBalance call have to be removed too :/
But new questions:
-
how can I set a specific amount to reduce with the customer_balance? I don't want to pay the whole amount of paymentIntent with the customer balance. (I thought that
applyCustomerBalanceis for that use, but it seems to be not the case..) -
I noticed that there are two kinds of balance, the credit balance and the cash balance.. I thought the
customer_balanceis the same for invoice and paymentIntent.. as they are not the same, how to adjust balance value? DoesCustomer Balance Transaction APIcan be used for both?
how can I set a specific amount to reduce with the customer_balance? I don't want to pay the whole amount of paymentIntent with the customer balance. (I thought that applyCustomerBalance is for that use, but it seems to be not the case..)
You would have to create the Payment Intent for that specific amount, then create a separate Payment Intent for the remainder
I noticed that there are two kinds of balance, the credit balance and the cash balance.. I thought the customer_balance is the same for invoice and paymentIntent.. as they are not the same, how to adjust balance value? Does Customer Balance Transaction API can be used for both?
Cash represents actual money that the user sent (for example, if they paid more than was required) and can be used to create refunds or apply to other payments. Credit represents how much is owed and is generally only used with Invoices and Subscriptions. It can also be adjusted arbitrarily without actually accepting/sending any money
They aren't used interchangeably in most cases, but there is some overlap in what they can do