Search code examples
stripe-paymentspayment-gatewaypayment

Separate authorization and capture using stripe


How Separate authorization and capture works ? I have reviewed the following Stripe Document document.

For example

$createCharge= \Stripe\Charge::create([
                'customer' =>  customer_id
                'card'=> card_id
                'currency' => 'CAD',
                'amount'   =>  1000,
                'capture' => false,
            ]);

If i execute above code than 1000 CAD will be blocked on customer's card for 7 days ? do we need to charge the customer again with in 7 days for actual payment ? or stripe automatically deduct 1000 CAD from customer's card after 7 or with in 7 days ?

They have written in the document

Note that a charge must be captured within seven days or it will be cancelled.

What will be cancelled case and refund cases here ?

Any help would be appreciated.


Solution

  • Stripe Support Replied which helped! Hope it helps someone else too!

    auth and capture allows to authorize a payment, which places a temporary hold on the funds without actually capturing them -- you will have the option to capture the authorized funds (or any partial amount) anytime within seven days of creating the authorization. If the charge is not captured within this time, the authorization will be dropped and funds released.

    In order to authorize a payment without capturing it, make a charge request that includes the capture parameter with a 'false' value.

    The example provided is the exact process on how to execute an authorization of $10.00 CAD on customer's card. This basically means that the funds are guaranteed by the card issuer and the amount will be held on the customer’s card for up to seven days. If the charge is not captured within this time, the authorization will be canceled and funds will be released automatically.

    Stripe will not automatically capture the authorized charge amount. When it's time to settle the authorized charge, you'd simply need to make the 'capture charge' request below:

    charge = stripe.Charge.capture('ch_xxxxxxxxx')
    

    Thank You!!