3

I am stuck with the question that I have successfully implemented Instant Payment Method of Stripe Payment Gateway but now I want change the Instant Payment to Two-Step Payments method because of some requirement.

I'm refering Does Stripe support auth and capture?. They are saying that

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

but I want Auto Capture Charge without Cancellation within 1 or 2 days if possible.

Help me if there is any idea to do this.

Your help would be appreciated.

Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
Mitul Koradiya
  • 318
  • 2
  • 5
  • 19

1 Answers1

2

https://stripe.com/docs/api#create_charge

capture optional, default is true

Whether or not to immediately capture the charge. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire in 7 days. For more information, see authorizing charges and settling later.

So, first off, you would create the charge, as you are now, but with capture set to false.

Then, when you want to actually charge the customer, you would call the charge capture method, passing in the ID of the charge created in the above step.

Unfortunately, there's no way of automatically doing this, so you're going to need to write some code - maybe as a cron job or scheduled task to fire off the capture charge part in x number of days

Alex
  • 37,502
  • 51
  • 204
  • 332