Skip to main content
What is it? An authorization is a request to the cardholder’s issuing bank to verify that the account is active and has enough credit or funds to make the transaction. If the request is approved, the authorization needs to be captured, which starts the process of withdrawing money from the cardholder’s account.
When to Use
  • You need to verify a customer has sufficient funds before processing a transaction.
  • You want to reserve funds for a future capture (e.g., for items that will ship later).
  • You need to secure payment before providing goods or services.
ScenarioBen purchases two mechanical keyboards, each costing $150, for an order total of $300. Both keyboards have to be assembled, and will be available to ship in 3-4 days. At the time of purchase, CoolTechGear.com submits a request to authorize $300 on Ben’s card ending in 1234.

Steps

  1. Call the authorizeCustomerInitiatedTransaction mutation, passing in the required and optional input fields:
Required inputDescription
acceptorIDThe unique, 36 character identifier assigned to the entity providing the goods or services to the cardholder. Other processors may refer to this as the Merchant ID (MID), Outlet ID, or Customer number.
transactionReferenceThe unique transaction identifier created by YOU to distiniguish this transaction from another.
paymentMethodDetailsIncludes the pertinent payment method details, whether the customer is paying with a card or bank transfer, and if those details are saved within a token.
transactionAmountDetailsThe amount of the transaction and its currency.
automaticCaptureSpecifies if the authorization should be automatically captured upon approval.

If you instruct to not automatically capture the authorization, keep track of the paymentId in the response, as it will be needed to capture the authorization. If you instructed to automatically capture upon aproval, then you are done with the authorization.

Automatic capture

Automatically capturing an authorization upon approval instructs Tesouro to submit a capture request on your behalf without requiring additional information or actions from you. To know if you should automatically capture upon approval, use the following chart:
ScenariosInput
- The final amount to capture will NOT change from the authorized amount.

- All product line items will shipped (or rendered) together.

- PIN debit transaction.
automaticCapture:"ON_APPROVAL"
- The final amount to capture may change from the authorized amount.

- Some or all of the purchased goods or services are not immediately available to ship or render at the time of authorization.
automaticCapture:"NEVER"
If the authorization is not captured or reversed within 10 days, you will be assessed a Misuse of Authorization fee.

Payment transaction reason

When submitting an authorization, accurately specifying the reason for the payment request can:
  • Help qualify the transaction for better interchange rates
  • Ensure proper processing and reporting
  • Comply with relevant financial regulations
If a reason is not provided, it will default to GENERAL_PURCHASE. Supported reasons:
ValueDescription
GENERAL_PURCHASEStandard customer purchases of goods or services.
DEBT_REPAYMENTThe payment will be used to reduce or eliminate an outstanding debt, such as credit card balances, loans, or other forms of borrowing.
mutation AuthorizeCIT($input: AuthorizeCustomerInitiatedTransactionInput!) {
  authorizeCustomerInitiatedTransaction(
    authorizeCustomerInitiatedTransactionInput: $input
  ) {
    authorizationResponse {
      status: __typename
      cardDetails {
        paymentBrand
        last4
      }
      tokenDetails {
        token
      }
      transactionId
      paymentId
    }
    errors {
      ... on Error {
        message
        __typename
      }
    }
  }
}
{
  "data": {
    "authorizeCustomerInitiatedTransaction": {
      "authorizationResponse": {
        "status": "AuthorizationApproval",
        "networkApprovalCode": "808907",
        "authorizationAmountDetails": {
          "approvedAmount": 36,
          "requestedAmount": 36,
          "currency": "USD"
        },
        "cardDetails": {
          "paymentBrand": "VISA",
          "last4": "0005"
        },
        "tokenDetails": {
          "token": "ae1d0699-a5f3-4548-aaa8-068b57564118"
        },
        "transactionId": "c0b554b8-7819-11ee-acb0-7445f363cd81",
        "paymentId": "c0b554b8-7819-11ee-acb0-7445f363cd81",
        "systemTraceAuditNumber": "808040",
        "networkResponseDetails": {
          "processorResponseCode": "A0000",
          "networkResponseCode": "00"
        },
        "avsResponseDetails": {
          "networkCode": null
        },
        "errors": null
      }
    }
  }
}
Run in Playground