Capture a test-mode authorization Test helper

Issuing
Authorizations
Capture a test-mode authorization

Capture a test-mode authorization.

Parameters

  • capture_amountinteger

    The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the smallest currency unit.

  • close_authorizationboolean

    Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows.

  • purchase_detailsobject

    Additional purchase information that is optionally provided by the merchant.

    • purchase_details.fleetobject

      Fleet-specific information for transactions using Fleet cards.

      • purchase_details.fleet.cardholder_prompt_dataobject

        Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.

        • purchase_details.fleet.cardholder_prompt_data.driver_idstring

          Driver ID.

        • purchase_details.fleet.cardholder_prompt_data.odometerinteger

          Odometer reading.

        • purchase_details.fleet.cardholder_prompt_data.unspecified_idstring

          An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.

        • purchase_details.fleet.cardholder_prompt_data.user_idstring

          User ID.

        • purchase_details.fleet.cardholder_prompt_data.vehicle_numberstring

          Vehicle number.

      • purchase_details.fleet.purchase_typestring

        The type of purchase. One of fuel_purchase, non_fuel_purchase, or fuel_and_non_fuel_purchase.

      • purchase_details.fleet.reported_breakdownobject

        More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.

        • purchase_details.fleet.reported_breakdown.fuelobject

          Breakdown of fuel portion of the purchase.

          • purchase_details.fleet.reported_breakdown.fuel.gross_amount_decimalstring

            Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.

        • purchase_details.fleet.reported_breakdown.non_fuelobject

          Breakdown of non-fuel portion of the purchase.

          • purchase_details.fleet.reported_breakdown.non_fuel.gross_amount_decimalstring

            Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.

        • purchase_details.fleet.reported_breakdown.taxobject

          Information about tax included in this transaction.

          • purchase_details.fleet.reported_breakdown.tax.local_amount_decimalstring

            Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.

          • purchase_details.fleet.reported_breakdown.tax.national_amount_decimalstring

            Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.

      • purchase_details.fleet.service_typestring

        The type of fuel service. One of non_fuel_transaction, full_service, or self_service.

    • purchase_details.flightobject

      Information about the flight that was purchased with this transaction.

      • purchase_details.flight.departure_attimestamp

        The time that the flight departed.

      • purchase_details.flight.passenger_namestring

        The name of the passenger.

      • purchase_details.flight.refundableboolean

        Whether the ticket is refundable.

      • purchase_details.flight.segmentsarray of objects

        The legs of the trip.

        • purchase_details.flight.segments.arrival_airport_codestring

          The three-letter IATA airport code of the flight’s destination.

        • purchase_details.flight.segments.carrierstring

          The airline carrier code.

        • purchase_details.flight.segments.departure_airport_codestring

          The three-letter IATA airport code that the flight departed from.

        • purchase_details.flight.segments.flight_numberstring

          The flight number.

        • purchase_details.flight.segments.service_classstring

          The flight’s service class.

        • purchase_details.flight.segments.stopover_allowedboolean

          Whether a stopover is allowed on this flight.

      • purchase_details.flight.travel_agencystring

        The travel agency that issued the ticket.

    • purchase_details.fuelobject

      Information about fuel that was purchased with this transaction.

      • purchase_details.fuel.industry_product_codestring

        Conexxus Payment System Product Code identifying the primary fuel product purchased.

      • purchase_details.fuel.quantity_decimalstring

        The quantity of units of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.

      • purchase_details.fuel.typestring

        The type of fuel that was purchased. One of diesel, unleaded_plus, unleaded_regular, unleaded_super, or other.

      • purchase_details.fuel.unitstring

        The units for quantity_decimal. One of charging_minute, imperial_gallon, kilogram, kilowatt_hour, liter, pound, us_gallon, or other.

      • purchase_details.fuel.unit_cost_decimalstring

        The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.

    • purchase_details.lodgingobject

      Information about lodging that was purchased with this transaction.

      • purchase_details.lodging.check_in_attimestamp

        The time of checking into the lodging.

      • purchase_details.lodging.nightsinteger

        The number of nights stayed at the lodging.

    • purchase_details.receiptarray of objects

      The line items in the purchase.

    • purchase_details.referencestring

      A merchant-specific order number.

Returns

An Authorization object.

POST /v1/test_helpers/issuing/authorizations/:id/capture
curl -X POST https://api.stripe.com/v1/test_helpers/issuing/authorizations/iauth_1DPc772eZvKYlo2C6avLyZ25/capture \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "iauth_1DPc772eZvKYlo2C6avLyZ25",
"object": "issuing.authorization",
"amount": 0,
"amount_details": {
"atm_fee": null,
"cashback_amount": null
},
"approved": true,
"authorization_method": "keyed_in",
"balance_transactions": [],
"card": {
"id": "ic_1FEiQC2eZvKYlo2CtahKepKy",
"object": "issuing.card",
"brand": "Visa",
"cancellation_reason": null,
"cardholder": {
"id": "ich_1Ccy6F2eZvKYlo2ClnIm9bs4",
"object": "issuing.cardholder",
"billing": {
"address": {
"city": "Beverly Hills",
"country": "US",
"line1": "123 Fake St",
"line2": "Apt 3",
"postal_code": "90210",
"state": "CA"
}
},
"company": null,
"created": 1528992903,
"email": "jenny@example.com",
"individual": null,
"livemode": false,
"metadata": {},
"name": "Jenny Rosen",
"phone_number": "+18008675309",
"preferred_locales": [],
"redaction": null,
"requirements": {
"disabled_reason": null,
"past_due": []
},
"spending_controls": {
"allowed_categories": [],
"blocked_categories": [],
"spending_limits": [],
"spending_limits_currency": null
},
"status": "active",
"type": "individual"
},
"created": 1567541772,
"currency": "usd",
"exp_month": 12,
"exp_year": 2020,
"last4": "4242",
"livemode": false,
"metadata": {
"status": "canceled"
},
"redaction": null,
"replaced_by": null,
"replacement_for": null,
"replacement_reason": null,
"shipping": null,
"spending_controls": {
"allowed_categories": null,
"blocked_categories": null,
"spending_limits": [],
"spending_limits_currency": null
},
"status": "canceled",
"type": "physical",
"wallets": {
"apple_pay": {
"eligible": true,
"ineligible_reason": null
},
"google_pay": {
"eligible": false,
"ineligible_reason": "missing_agreement"
},
"primary_account_identifier": null
}
},
"cardholder": "ich_1Ccy6F2eZvKYlo2ClnIm9bs4",
"created": 1540586461,
"currency": "usd",
"livemode": false,
"merchant_amount": 0,
"merchant_currency": "usd",
"merchant_data": {
"category": "taxicabs_limousines",
"category_code": "4121",
"city": "San Francisco",
"country": "US",
"name": "Rocket Rides",
"network_id": "1234567890",
"postal_code": "94107",
"state": "CA",
"terminal_id": null
},
"metadata": {},
"network_data": null,
"pending_request": null,
"redaction": null,
"request_history": [],
"status": "reversed",
"transactions": [],
"verification_data": {
"address_line1_check": "not_provided",
"address_postal_code_check": "match",
"cvc_check": "match",
"expiry_check": "match"
},
"wallet": null
}