#Hritik_9

1 messages · Page 1 of 1 (latest)

echo grailBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

vestal oak
#

Hi! I'd start by looking at general Stripe docs for taking payments, and then you can create databases for representing customer balances in your system that get updated when you take a payment.

hazy blaze
#

Its Ok for Customer Balance we are using Customer credit balance APIs
That's fine .but for depositing the custom amount did we have any checkout session for that?
for ex. on click of deposite we have to open session/payment sheet to pay by card or bank account

vestal oak
#

not sure what you're asking but you can completely control the amount you charge your users by passing appropriate parameters in the specific APIs you use.

hazy blaze
#

I want to use wallet System for my website.

#

means customer can have their amount in their creadit balance ..
and that amount they can use while PAY.

vestal oak
#

makes sense. Did you have specific technical questions about specific parts of Stripe or specific code or products?

hazy blaze
#

Yes!
Can we Pay Only Amount using checkout-session ?
also how can we pay amount by already added card/bank account

vestal oak
hazy blaze
vestal oak
hazy blaze
#

Okay will use checkout->session() but how i can pass already added bankaccount or card of that customer

vestal oak
#

you can't, not with Checkout.

hazy blaze
#

but chatgpt has provide me this code
$checkoutSession = $stripe->checkout->sessions->create([
'success_url' => route('deposit.success'), // Define your success route
'cancel_url' => route('deposit.cancel'), // Define your cancel route
'payment_method_types' => ['card'], // Use 'card' for credit/debit card payments
'mode' => 'payment', // Set mode to 'payment'
'customer' => $customer_id, // The customer's Stripe ID
'payment_method' => $card_id, // Use the saved card's ID
'line_items' => [
[
'price_data' => [
'currency' => 'usd', // Replace with your desired currency
'unit_amount' => $depositAmount, // Amount in the smallest currency unit (e.g., cents)
'product_data' => [
'name' => 'Deposit', // Name for the deposit
],
],
'quantity' => 1, // Quantity is 1 for a single payment
],
],
]);

#

If not then how can i overcome this.. how i can use already added card/bankaccount while depositing the money using checkout session

vestal oak
#

that code doesn't work, it's a hallucination from ChatGPT. There is no such thing as 'payment_method' => $card_id, // Use the saved card's ID in the Checkout API.

hazy blaze
#

yes correct

vestal oak
hazy blaze
#

what modifications i can do in my checkout session api

vestal oak
#

see above.

echo grailBOT
hazy blaze
#

Yes solved the issue with client . Now what if i want to pay with indian bank account.?
then which changes i need to do in checkout session api

turbid beacon
hazy blaze
#

Oh no!
How about UPI payment for indian customers only?

turbid beacon
#

You'd need to speak to support about UPI: https://support.stripe.com/contact

hazy blaze
#

f

#

Where does the amount paid by the customer go? which bank account?

turbid beacon
hazy blaze
#

Okay!
as a customer How i can withdraw the paid amount of customer and it should withdraw to customer account who had paid

turbid beacon
#

I don't understand what you mean

hazy blaze
#

in above image suppose i have deposited 100$ and used 20$
then how i can withdraw the remaining 80$
(look as a customer point of view)

turbid beacon
#

You'd need to use Connect to facilitate payouts to 'customers'

hazy blaze
#

oh okay.
how it works?

turbid beacon
hazy blaze
#

(As per user view)->So if i have $80 in my deposited balance and i clicks on withdraw money by whcih api the amount will get transfer to my account?

turbid beacon
#

You need to take a step back here and understand how this will work. You will need to onboard your 'customer' as a Stripe account to your Connect platform in order for them to withdraw funds like that

#

The above URL is a starting point

hazy blaze
#

okayy

#

Do you have more example for this..?

turbid beacon
#

Which part specifically?

hazy blaze
#

withdraw

turbid beacon
hazy blaze
#

The withdraw amount that customer paid..

hazy blaze
turbid beacon
#

Yeah there are few required steps you need to do before you can get to that point. Link above is the first

hazy blaze
#

Okay

#

can i use this
$payout = $stripe->payouts->create([
'amount' => $withdrawAmount, // Amount in cents (e.g., $100.00)
'currency' => 'inr',
]);
payouts api for withdraw the money to the customer's Payment methods