Sample - Stripe API
POST/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount

Finalize a test-mode authorization amount

Finalizes the amount of a test-mode Issuing authorization before capture. Supply final_amount when the initial authorization used an estimated amount, and include fleet or fuel details when applicable.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 4 body fields
authorizationstringrequired
The unique identifier of the test-mode Issuing authorization. Must be no longer than 5000 characters.

Form-encoded details for setting the final authorization amount and optionally describing fleet or fuel purchases.

expandarray<string>optional
Specifies which fields in the response should be expanded.
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](https://docs.stripe.com/currencies#zero-decimal).
fleetobjectoptional
Fleet-specific information for authorizations using Fleet cards.
fuelobjectoptional
Information about fuel that was purchased with this transaction.

2 status codes
200Returns the Issuing Authorization object with its finalized amount and current authorization details.
amountintegerrequired
The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.
amount_detailsobjectoptional
Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
approvedbooleanrequired
Whether the authorization has been approved.
authorization_methodstringrequired
How the card details were provided.
Allowed:chipcontactlesskeyed_inonlineswipe
balance_transactionsarray<BalanceTransaction>required
List of balance transactions associated with this authorization.
cardobjectrequired
You can [create physical or virtual cards](https://docs.stripe.com/issuing) that are issued to cardholders.
card_presencestringoptional
Whether the card was present at the point of sale for the authorization.
Allowed:not_presentpresent
cardholderstringoptional
The cardholder to whom this authorization belongs.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
fleetobjectoptional
Fleet-specific information for authorizations using Fleet cards.
fraud_challengesarray<IssuingAuthorizationFraudChallenge>optional
Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
fuelobjectoptional
Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
merchant_amountintegerrequired
The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.
merchant_currencystringrequired
The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
merchant_dataobjectrequired
metadataobjectrequired
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
network_dataobjectoptional
Details about the authorization, such as identifiers, set by the card network.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:issuing.authorization
pending_requestobjectoptional
The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
request_historyarray<IssuingAuthorizationRequest>required
History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
statusstringrequired
The current status of the authorization in its lifecycle.
Allowed:closedexpiredpendingreversed
tokenstringoptional
[Token](https://docs.stripe.com/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.
transactionsarray<Transaction>required
List of [transactions](https://docs.stripe.com/api/issuing/transactions) associated with this authorization.
treasuryobjectoptional
[Treasury](https://docs.stripe.com/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://docs.stripe.com/api/treasury/financial_accounts).
verification_dataobjectrequired
verified_by_fraud_challengebooleanoptional
Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
walletstringoptional
The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
defaultError response.
errorobjectrequired

Error handling

authorization must be a string no longer than 5000 characters, and final_amount must be supplied in the authorization currency's smallest unit. If provided, fleet.purchase_type must be one of fuel_and_non_fuel_purchase, fuel_purchase, or non_fuel_purchase, while fleet.service_type, fuel.type, and fuel.unit must use their defined values.