Stripe.captureCharge()

Capture the payment of a previously-created charge in Stripe.

This is the second half of the two-step payment flow, where first you created a charge with the "capture" option set to false. Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

Usage

Hover over inputs/exits for more info.

var Stripe = require('machinepack-stripe-subscriptions');


// Capture the payment of a previously-created charge in Stripe.

Stripe.captureCharge({

apiKey: 'somestring837483749blah',

charge: 'ch_14ziQH2eZvKYlo2Ci0BoqQvT',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

apiKey required

Your Stripe API key

'somestring837483749blah'
charge required

The Stripe id of an "uncaptured" charge

'ch_14ziQH2eZvKYlo2Ci0BoqQvT'

Exits

error

An unexpected error occurred.

success

OK.

N/A