Accept online payments with Aera's hosted checkout, direct payments and recurring payments.
Early release: preliminary docs and specsOnline 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
- Create a payment session. Call Create payment session. You get a
pspReferenceand apaymentSessionUrl. - Send the shopper to checkout. Redirect the shopper to
paymentSessionUrl, or embed the checkout form in your page. - Check the result. When the shopper comes back to your redirect URL, call Get payment status.
- Finish the payment. Capture it when you ship, or cancel it. Later you can refund it.
Start a payment.
Manage a payment after it is authorized.
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 need | Where |
|---|---|
| An API key and client credentials | Get access |
| An access token from Access PSP | Authentication |
| The test and production hosts | Environments |
| The payment methods you can offer | Online payment methods |
| What response codes mean | Errors and response codes |
New to online payments with Aera?Start with the guide: Online payments.