--- title: "Authorize Transaction" slug: "authorize-transaction" updated: 2025-09-22T20:31:19Z published: 2025-09-22T20:31:19Z canonical: "developer.upgrade.com/authorize-transaction" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.upgrade.com/llms.txt > Use this file to discover all available pages before exploring further. # Authorize Transaction Post/v1/transactions Using the `order_id` from the checkout flow, an authorization is the first step using the Transaction API. Once an authorization is submitted against an Order, a new Transaction is created. In most use cases, you will only have one transaction for each order when you authorize for the entire order amount. When the transaction is successfully authorized, you will receive a unique transaction id in the response. You can also refer to the Transaction and Transaction Event object dictionary for the definition of the API responses. **Authorization expiration**: once a transaction is authorized, you will have up to 7 days to submit capture requests to request payments from Flex Pay. After the expiration, no new captures may be placed on this transaction, and the remaining amount is automatically voided. This expiration timestamp is provided in the `authorization_expiration` field in the Transaction object for your reference. SecurityHTTPType bearer Header parametersIdempotency-KeystringRequired Idempotency key to prevent duplicate requests. Body parametersobject order_idstring (uuid) Required The order_id received from Flex Pay during the checkout flow. amountnumber (decimal) The amount you’re authorizing for this transaction. If left blank, authorize the remaining approved amount. Minimum0 currencystring The currency in which you’re authorizing the transaction for. This should be the same as the checkout currency. In ISO 4217 format. Required if amount is provided. merchant_reference_idstring Optional field for merchants to enter their own reference ID to aid in reconciliation. Responses200 Successful response Expand Allobject idstring (uuid) The unique transaction_id generated when an authorization is submitted for an order. original_amountnumber (decimal) The original amount the transaction was authorized for. remaining_amountnumber (decimal) The remaining amount that can be captured. captured_amountnumber (decimal) The cumulative amount that has been successfully captured. refunded_amountnumber (decimal) The cumulative amount that has been successfully refunded. authorization_expirationstring (date-time) Once a transaction is authorized, the merchant has a limited number of days to capture on the remaining amount. RFC3339 format. order_idstring (uuid) The Flex Pay order that the transaction is authorized for. createdstring (date-time) Timestamp of when this transaction was first authorized. RFC3339 format. currencystring ISO 4217 currency code for the amount fields. merchant_reference_idstring Optional field for merchants to enter their own reference ID to aid in reconciliation. statusstring The current status of the transaction. Valid values[ "AUTHORIZED", "AUTHORIZED_FAILED", "AUTHORIZATION_EXPIRED", "CAPTURED", "PARTIALLY_CAPTURED", "REFUNDED", "PARTIALLY_REFUNDED", "VOIDED" ] events Array of object (TransactionEventAto) A list of transaction events. See TransactionEventAto object. object idstring (uuid) The unique event_id generated for the transaction event. amountnumber (decimal) The amount corresponding to the transaction event. currencystring ISO 4217 currency code for the amount field. createdstring (date-time) Timestamp of when this transaction event took place. RFC3339 format. merchant_reference_idstring Optional field for merchants to enter their own reference ID to aid in reconciliation. typestring The type of action that this event represents. Valid values[ "AUTHORIZATION", "VOID", "CAPTURE", "REFUND" ] 400 response for errors object codeNamestring The name of the error codes. Valid values[ "INSUFFICIENT_FUNDS", "OVER_CAPTURE_ERROR", "OVER_REFUND_ERROR", "OVER_VOID_ERROR", "NO_AMOUNT_LEFT", "LINE_EXPIRED_ERROR", "AUTH_EXPIRED_ERROR", "CURRENCY_MISMATCH_ERROR", "TRANSACTION_NOT_FOUND", "INCORRECT_ORDER_ID", "INVALID_INPUT", "NOT_READABLE_INPUT", "IDEMPOTENCY_KEY_ALREADY_USED", "MISSING_IDEMPOTENCY_KEY", "UNEXPECTED_ERROR" ] messagestring 401 Unauthorized (you don't have access) 403 Forbidden(you don't have the permission to perform this operation) 500 response for errors object codeNamestring The name of the error codes. Valid values[ "INSUFFICIENT_FUNDS", "OVER_CAPTURE_ERROR", "OVER_REFUND_ERROR", "OVER_VOID_ERROR", "NO_AMOUNT_LEFT", "LINE_EXPIRED_ERROR", "AUTH_EXPIRED_ERROR", "CURRENCY_MISMATCH_ERROR", "TRANSACTION_NOT_FOUND", "INCORRECT_ORDER_ID", "INVALID_INPUT", "NOT_READABLE_INPUT", "IDEMPOTENCY_KEY_ALREADY_USED", "MISSING_IDEMPOTENCY_KEY", "UNEXPECTED_ERROR" ] messagestring