Capture a payment

Collect the money you reserved at checkout, in full or in parts.

🚧

Early release

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

When a payment is authorised, the issuer checks the payment method and reserves the money on the shopper's account, but doesn't move it. Capturing collects the reserved money.

You can capture payments for methods that authorise first, such as cards and some alternative payment methods. What works depends on your acquirer and the payment methods you support.

When to capture

You need to capture when you created the payment with "immediateCapture": false:

  1. The payment is authorised.
  2. The money is reserved on the shopper's account.
  3. You call Capture payment to collect it, for example when you ship.

If you sent "immediateCapture": true, the payment is captured at once. Don't call capture.

Capture the full amount

Send the request without a body, or without amountDetails. Aera captures the full remaining authorised amount.

POST /v1/{pspReference}/capture

You can add your own reference:

Example full capture with a reference
{
  "reference": "Goods delivered"
}

Capture part of the amount

Send amountDetails with the amount to capture.

Example partial capture request
{
  "amountDetails": { "amount": 5000, "currency": "NOK" },
  "reference": "Partial shipment 1",
  "cancelRemainingReservation": true
}
FieldDescription
amountDetailsThe amount to capture, in minor units. Leave out to capture the full remaining amount.
referenceYour own text for this capture. Optional.
cancelRemainingReservationtrue: Aera cancels the rest of the authorised amount after this capture. Set it on your last partial capture.

One partial capture

Use this when you know the final amount when you capture, and there's only one shipment or delivery.

  • You capture part of the authorised amount.
  • The rest is cancelled.
  • The payment is then fully processed.

Several partial captures (split shipment)

Use this when you ship an order in several parts, for example:

  • Orders shipped in several batches
  • Omnichannel orders (pick up some items in store, ship the rest from a warehouse)
  • Orders with items delivered separately

How it works:

  1. Create the payment with "splitShipment": true. Aera then offers only payment methods that support several captures.
  2. Capture each part as you ship it. The rest of the authorised amount stays open after each capture.
  3. On the last capture, send cancelRemainingReservation true, or capture the remaining amount.
  4. When the captured total equals the authorised amount, the payment is captured.

splitShipment is ignored when immediateCapture is true.

Whether you can make partial captures depends on the payment method, the acquirer and the card scheme rules.

Response

responseInfo.responseCode 0 means the capture succeeded. To see all captures on a payment, call Get payment status.


Did this page help you?