Finalize a test-mode authorization's amount Test helper

Issuing
Authorizations
Finalize a test-mode authorization's amount

Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.

Parameters

  • final_amountintegerRequired

    The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the smallest currency unit.

More parameters

  • fleetobject

    Fleet-specific information for authorizations using Fleet cards.

    • 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.

      • fleet.cardholder_prompt_data.driver_idstring

        Driver ID.

      • fleet.cardholder_prompt_data.odometerinteger

        Odometer reading.

      • 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.

      • fleet.cardholder_prompt_data.user_idstring

        User ID.

      • fleet.cardholder_prompt_data.vehicle_numberstring

        Vehicle number.

    • fleet.purchase_typestring

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

    • fleet.reported_breakdownobject

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

      • fleet.reported_breakdown.fuelobject

        Breakdown of fuel portion of the purchase.

        • fleet.reported_breakdown.fuel.gross_amount_decimalstring

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

      • fleet.reported_breakdown.non_fuelobject

        Breakdown of non-fuel portion of the purchase.

        • fleet.reported_breakdown.non_fuel.gross_amount_decimalstring

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

      • fleet.reported_breakdown.taxobject

        Information about tax included in this transaction.

        • 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.

        • 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.

    • fleet.service_typestring

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

  • fuelobject

    Information about fuel that was purchased with this transaction.

    • fuel.industry_product_codestring

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

    • fuel.quantity_decimalstring

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

    • fuel.typestring

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

    • fuel.unitstring

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

    • fuel.unit_cost_decimalstring

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

Returns

An Authorization object

POST /v1/test_helpers/issuing/authorizations/:id/finalize_amount
curl https://api.stripe.com/v1/test_helpers/issuing/authorizations/iauth_1DPc772eZvKYlo2C6avLyZ25/finalize_amount \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d final_amount=1000
Response
{
"id": "iauth_1DPc772eZvKYlo2C6avLyZ25",
"object": "issuing.authorization",
"amount": 1000,
"amount_details": {
"atm_fee": null,
"cashback_amount": null
},
"approved": true,
"authorization_method": "chip",
"balance_transactions": [],
"card": "ic_1Nsse72eZvKYlo2CWBGm2WQ5",
"cardholder": "ich_1Ccy6F2eZvKYlo2ClnIm9bs4",
"created": 1540586461,
"currency": "usd",
"livemode": false,
"merchant_amount": 1000,
"merchant_currency": "usd",
"merchant_data": {
"category": "automated_fuel_dispensers",
"category_code": "5542",
"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
}