Skip to main content

Direct API and transactions

A direct API integration lets you build and run the whole payment experience yourself. Instead of a hosted page collecting card details, your application collects them and sends them straight to the API for authorization, capture, refunds, and more.

It's the right choice when you need complete control over checkout, payment flows, and the interface, and you can take on more development work and more responsibility for security and compliance.

Features

With a direct API integration you can:

  • Build fully custom payment forms and checkout experiences
  • Add payments to web, mobile, or back-end applications
  • Control authorization, capture, voids, refunds, and recurring payments
  • Connect payments to order management, subscriptions, invoicing, and customer portals
  • Own the presentation, validation, and customer interactions

Security and PCI compliance

With a direct integration, card data passes through your systems before it reaches the gateway, so you are responsible for protecting it and for meeting PCI DSS. This usually means a much larger PCI scope than hosted options. Before you choose this path, review:

  • Your PCI DSS obligations
  • How you store and transmit payment data
  • Encryption and tokenization
  • Application and infrastructure security controls
  • Ongoing compliance monitoring and audits

Note

Not sure you need full control? Hosted fields give you a custom-looking checkout while keeping card data off your servers.

Transactions

Use the transactions API to create and manage payments across their whole life.

TypeWhat it doesWhen to use it
SaleCreates a payment and tries to authorize and capture it, based on your account setupA customer buys something
VoidCancels an earlier payment before it settlesYou need to cancel quickly, without a refund
RefundReturns all or part of a successful paymentThe payment has already settled, so a void is no longer possible

Common transaction flow

  1. 1Build the request. Include your credentials, order reference, amount, currency, payment details, and customer details as your integration needs.
  2. 2Send it to the transactions endpoint from your server over HTTPS, and keep your own reference IDs for tracking.
  3. 3Read the response: the transaction status, gateway references, and any decline or validation messages.
  4. 4Save the transaction ID and related references. You need them to void or refund later.
  5. 5Handle later updates. If you use notifications, update the final status in your system when it changes. See webhooks.

Key considerations

AreaWhat to do
RetriesUse safe retry logic so a dropped connection never creates a duplicate payment
Validation and errorsCheck required fields before sending, and turn decline codes into clear customer messages
SecurityProtect your credentials, handle as little card data as possible, and follow PCI DSS
ReconciliationStore order IDs, transaction IDs, timestamps, and amounts so finance and support can trace every payment

Ready to try it? Send your first API request, then use the testing guide.

Gateway services in this section are provided through ONKORE's processing partner, Elavon. Developer accounts, sandbox and production credentials, the developer portal, and the merchant portal are provided by Elavon, so you'll see the Elavon name in those emails, portals, and API addresses. ONKORE remains your point of contact.