Direct payments

Start a payment with the method the shopper chose in your checkout, without Aera's checkout page.

🚧

Early release

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

Direct payments isn't a third checkout model. It's an extra option next to the hosted and embedded checkout, for a few cases where you already know how the shopper wants to pay. You show the payment options in your own checkout. When the shopper chooses one, you start the payment with Create direct payment session. Aera's checkout page is shown only if the shopper must authenticate.

Use it for:

Payment methodmethodWhat you send
A saved card (one-click)CARDThe card's paymentInstrumentReference
VippsVIPPSThe shopper's mobile number (optional) and a payment text
Apple PayAPPLEPAYThe Apple Pay token from your own Apple Pay integration

How the response works

  • No paymentSessionUrl in the response: the payment was approved or declined without the shopper. Check responseInfo.responseCode, or call Get payment status.
  • A paymentSessionUrl in the response: the shopper must do something, such as authenticate. Redirect the shopper to it, then handle the result as for the hosted checkout.

Keep the pspReference. All later operations, such as capture, cancel, refund, update and status, use it.

Pay with a saved card (one-click)

The shopper chose a card they saved earlier. Send its paymentInstrumentReference (from Get payment instruments) in paymentInstrumentsProfileData.

Example request: saved card
{
  "merchantData": {
    "successRedirectUrl": "https://shop.example.com/order/1234/success",
    "cancelRedirectUrl": "https://shop.example.com/order/1234/cancel",
    "errorRedirectUrl": "https://shop.example.com/order/1234/error"
  },
  "transactionData": {
    "merchantReference": "order-1234",
    "immediateCapture": true,
    "amountDetails": { "amount": 10000, "currency": "NOK" }
  },
  "paymentInstrumentsProfileData": {
    "merchantShopperId": "customer-10045",
    "paymentInstrumentReference": "0192a7c4-5e1b-7d2a-8f3c-4b5a6c7d8e9f"
  },
  "paymentMethodInfo": {
    "paymentMethodDetails": [ { "method": "CARD" } ]
  }
}

What happens:

  1. If the amount is below the low-value exemption limit (currently NOK 300 or EUR 30) and the card supports it, Aera tries a low-value exemption. If the issuer approves, the payment completes without the shopper, and there's no paymentSessionUrl.
  2. If the amount is above the limit, or the issuer soft-declines the exemption (asks for authentication), the response has a paymentSessionUrl. Show it to the shopper. Authentication can be frictionless or need the shopper to act.

Pay with Vipps

Example paymentMethodInfo: Vipps MobilePay
"paymentMethodInfo": {
  "paymentMethodDetails": [
    {
      "method": "VIPPS",
      "vipps": {
        "mobileNo": "+4711111111",
        "paymentDescription": "Order 1234"
      }
    }
  ]
}
FieldDescription
mobileNoThe shopper's mobile number, in E.164 format. Vipps MobilePay uses it to confirm and authenticate the payment. Optional.
paymentDescriptionA short text the shopper sees in Vipps. Optional.

The shopper approves the payment in the Vipps app. See Vipps.

Pay with Apple Pay

Use this when you run your own Apple Pay integration and get the payment token from Apple. Pass the token on unchanged.

Example paymentMethodInfo: Apple Pay
"paymentMethodInfo": {
  "paymentMethodDetails": [
    {
      "method": "APPLEPAY",
      "applePay": {
        "poiChannel": "WEB",
        "token": {
          "paymentMethod": { "displayName": "Visa 1234", "network": "Visa", "type": "debit" },
          "transactionIdentifier": "…",
          "paymentData": { }
        }
      }
    }
  ]
}

See Apple Pay for the fields.

Good to know

  • Send only one payment method in paymentMethodDetails.
  • immediateCapture and splitShipment work as for the hosted checkout. See Capture a payment.

Did this page help you?