Overview

Send every payment through one endpoint, let Preczn route it to the right connection, and get one response shape back.

Transactions gives you one endpoint for every payment your merchants take. You send each charge, hold, capture, void, and refund to Preczn, and Preczn sends it to one of the merchant's connections. Preczn does three things for you:

  • Takes one request shape. You send every transaction type to POST /v1/transactions, whichever connection processes it.
  • Routes each transaction. Preczn sends the transaction to the connection your request names, or lets the merchant's routing plan choose one.
  • Returns one result shape. Every connection's result comes back as the same transaction object, in the response and in transaction webhooks.

The following diagram shows where each piece sits:

flowchart LR
    A["Your platform"] -- "Transaction request" --> B["<img src='https://files.readme.io/cf81688a760902dd88bc091cf29030cb150243a4dfad5e5fa2044ddb12dabb5e-Preczn_logo_white.png' width='110' /><br/>Picks the connection<br/>Normalizes the result"]
    B --> C1["Named connection"]
    B --> C2["Connection chosen<br/>by the merchant's plan"]
    B -. "Response and webhooks" .-> A
    classDef platform fill:#2563eb,stroke:#1d4ed8,color:#ffffff
    classDef preczn fill:#4013be,stroke:#300e90,color:#ffffff
    classDef proc fill:#059669,stroke:#047857,color:#ffffff
    class A platform
    class B preczn
    class C1,C2 proc

What your platform gets

  • One integration for many connections. Card and bank account payments use the same endpoint and the same request shape, so adding a connection doesn't mean a new payments integration.
  • Normalized results. Each transaction reports its outcome as one authorization.status value, and card transactions report CVV and address verification results as Preczn codes instead of each connection's own codes.
  • Routing you change without changing requests. When your requests leave the choice to Preczn, you change where transactions go by editing the merchant's plan.
  • Transaction data in one place. Transactions from every connection are available through the API, in transaction webhooks, and as a CSV export from the Dashboard.

When to use it

Use Transactions when a merchant on your platform takes a payment from a card or a bank account. The merchant needs a connection that accepts that payment method. See Supported connections.

To draw funds against an approved loan, see Request a drawdown in Lending.


Key concepts

Transaction type
The type field on the request decides what the transaction does: sale, auth, capture, verify, void, or refund. See Choose a transaction type.

Follow-on transaction
A capture, void, or refund acts on an earlier transaction. It sends that transaction's ID in transactionId, and Preczn takes the merchant and the connection from the earlier transaction.

Payment method
The card or bank account that a sale, auth, or verify charges or checks. You usually send it as a Preczn token in payment.token. Preczn replaces the token with the stored payment data before it calls the connection. See Tokenization Overview.

Direct routing and plan routing
When the request names a connection in processor, Preczn sends the transaction to that connection. When it doesn't, Preczn uses the rules in the merchant's routing plan. See Choose a routing method.

Transaction status
authorization.status holds the outcome: A (approved), D (declined), P (pending), or E (error). A pending transaction changes status later, and Preczn sends a transaction webhook when it does. See Transaction webhook payloads.


How a transaction is processed

The following steps show what happens to a request:

  1. Your platform sends a transaction request with the type, the merchant, and the payment method, or with the ID of the transaction it follows on from.
  2. Preczn checks the request. For example, the merchant must be active and belong to your platform, and your API key must be in the same mode as the merchant.
  3. Preczn picks the connection. A follow-on transaction goes to the connection of the transaction it acts on. Any other transaction goes to the connection named in processor, or to the one the merchant's plan chooses.
  4. Preczn sends the transaction to the connection and returns the result in the response, with authorization.status and the connection's own code and message.
  5. Preczn sends a transaction webhook for the result to the endpoints you subscribed, and again when a pending transaction is approved, declined, or errors.

When Preczn rejects a request in step 2 or 3, the response is an error, and the connection isn't called. See Troubleshooting.


Where to go next

  • If you want to send a sale, an authorization, a capture, a void, or a refund, read Processing transactions.
  • If you want to add card-only data, such as card-on-file flags or Level II data, read Card payments.
  • If you want to charge, verify, or refund a bank account, read ACH payments.
  • If you want Preczn to choose a connection for each transaction, read Routing.
  • If you want to get transaction data into your own systems, read Transaction data.

Did this page help you?