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
- Call the authorizeCustomerInitiatedTransaction mutation, passing in the required and optional input fields:
| Required input | Description |
|---|---|
acceptorID | The 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. |
transactionReference | The unique transaction identifier created by YOU to distiniguish this transaction from another. |
paymentMethodDetails | Includes 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. |
transactionAmountDetails | The amount of the transaction and its currency. |
automaticCapture | Specifies 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:| Scenarios | Input |
|---|---|
| - 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" |
Payment transaction reason
When submitting an authorization, accurately specifying thereason for the payment request can:
- Help qualify the transaction for better interchange rates
- Ensure proper processing and reporting
- Comply with relevant financial regulations
GENERAL_PURCHASE.
Supported reasons:
| Value | Description |
|---|---|
GENERAL_PURCHASE | Standard customer purchases of goods or services. |
DEBT_REPAYMENT | The payment will be used to reduce or eliminate an outstanding debt, such as credit card balances, loans, or other forms of borrowing. |