- You need to verify a customer has sufficient funds before processing a transaction, or
- You want to reserve funds for a future capture (e.g., for items that will ship later), or
- You need to secure payment before providing goods or services.
ExampleBen opens an online subscription to StreamHQ’s monthly video streaming service plan. StreamHQ submits a customer initiated transaction to start his first month.
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 distinguish 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 |
|---|---|
| If the final amount to capture will NOT change from the authorized amount And all product line items will be shipped (or rendered) together | automaticCapture:"ON_APPROVAL" |
| If the final amount to capture may change from the authorized amount And 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 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. |