Online Payments API

Accept online payments with Aera's hosted checkout, direct payments and recurring payments.

🚧

Early release: preliminary docs and specs

Online payment is in early development (MVP). This section may change.

The Online payments API is the core of online payments with Aera. Use it to create payment sessions for Aera's hosted checkout, start a payment directly with a payment method the shopper chose in your own checkout, and charge stored payment instruments for recurring payments. After that, you capture, cancel, refund or update the payment.

How a payment works

  1. Create a payment session. Call Create payment session. You get a pspReference and a paymentSessionUrl.
  2. Send the shopper to checkout. Redirect the shopper to paymentSessionUrl, or embed the checkout form in your page.
  3. Check the result. When the shopper comes back to your redirect URL, call Get payment status.
  4. Finish the payment. Capture it when you ship, or cancel it. Later you can refund it.
Payment operations

Manage a payment after it is authorized.

Payment instruments

Manage what shoppers have stored.

Payment states

A payment moves through these states. Each operation is allowed only in some of them.

stateDiagram-v2
    [*] --> CREATED : create session
    CREATED --> AUTHORIZED : authorized
    CREATED --> CANCELED : shopper or merchant cancels
    CREATED --> FAILED : failed
    AUTHORIZED --> AUTHORIZED : update (extend or adjust), if the acquirer approves
    AUTHORIZED --> CAPTURED : capture
    AUTHORIZED --> CANCELED : cancel
    CAPTURED --> REFUNDED : refund
    REFUNDED --> [*]
    CANCELED --> [*]
    FAILED --> [*]
All states, including partial captures, cancels and refunds
stateDiagram-v2
    [*] --> CREATED : create session
    CREATED --> AUTHORIZED : authorized
    CREATED --> CANCELED : shopper or merchant cancels
    CREATED --> FAILED : failed
    AUTHORIZED --> AUTHORIZED : update
    AUTHORIZED --> PARTIALLY_CAPTURED : capture (partial)
    AUTHORIZED --> CAPTURED : capture (full)
    AUTHORIZED --> PARTIALLY_CANCELED : cancel (partial)
    AUTHORIZED --> CANCELED : cancel (full)
    PARTIALLY_CAPTURED --> PARTIALLY_CAPTURED : capture (partial)
    PARTIALLY_CAPTURED --> CAPTURED : capture (remaining) or last capture
    PARTIALLY_CANCELED --> PARTIALLY_CANCELED : cancel (partial)
    PARTIALLY_CANCELED --> CANCELED : cancel (remaining)
    CAPTURED --> PARTIALLY_REFUNDED : refund (partial)
    CAPTURED --> REFUNDED : refund (full)
    PARTIALLY_REFUNDED --> PARTIALLY_REFUNDED : refund (partial)
    PARTIALLY_REFUNDED --> REFUNDED : refund (remaining)
    REFUNDED --> [*]
    CANCELED --> [*]
    FAILED --> [*]

Update changes the amount or extends the authorization, if the acquirer approves. Last capture is a partial capture with cancelRemainingReservation set to true.

Before you start

You needWhere
An API key and client credentialsGet access
An access token from Access PSPAuthentication
The test and production hostsEnvironments
The payment methods you can offerOnline payment methods
What response codes meanErrors and response codes
📘

New to online payments with Aera?

Start with the guide: Online payments.