Create Payment Session

Creates a new checkout session and initializes a payment.

This endpoint is the entry point for starting an online transaction. It:

  • Registers the payment with Aera
  • Defines the transaction amount and configuration
  • Determines which payment methods are available
  • Configures redirect and webhook behavior
  • Returns a pspReference and checkoutUrl for completing the payment

All subsequent operations — such as capture, cancel, refund, update, and status retrieval — reference the pspReference generated by this request.


Request Structure

{
  "header": {
    "merchantId": "Aera Merchant ID",
    "idempotency-key": "UUID v7 provided by merchant to uniquely identify the request"
  },
  "body": {
    "merchantInfo": {
      "ui": {  
        "mode": "enum EMBED, optional only if you want to embed Aera´s hosted checkout form in your checkout",
        "origin": "merchant URL"
      },
      "successRedirectUrl": "Redirect URL on successful payment",
      "cancelRedirectUrl": "Redirect URL on payment cancel",
      "errorRedirectUrl": "Redirect URL on payment error",
      "webhookUrl": "Absolute or relative URL (validated against configured domain)"
    },
    "transactionData": {
      "merchantReference": "Merchant provided reference to the payment (e.g. order number)",
      "immediateCapture": "Optional, true if immediate capture requested, default false",
      "forceAuthentication": "Optional, true if explicit authentication is requested",
      "splitShipment": "Optional, true if shipment potentially can be split into multiple shipments",
			"storePaymentInstrument": "Optional, true if storing the payment instrument is mandated",
      "amountDetails": {
        "amount": "Gross amount in minor units",
        "currency": "ISO 4217 alphabetic code (e.g.NOK), must be the same as the merchant currency"
      }
    },
    "paymentInstrumentsProfileData": {
      "merchantShopperId": "Conditional: Merchant provided end-user ID (e.g. loyalty number, phone number)",
      "pspShopperId": "Conditional: UUID assigned by PSP, either merchantShopperId or pspShopperId required",
      "paymentInstrumentReference": "Optional: Reference to a pre selected payment instrument",
      "allowStoredInstrumentsOnly": "Optional: Only present stored payment instruments as payment option - Default false"
    },
    "paymentMethodInfo": {
      "paymentMethodWhitelist": [
        "Optional: List of payment methods allowed for this transaction"
      ],
      "paymentMethodDetails": [
        {
          "CARD": {
            "cardSchemeWhitelist": [
              "Optional: List of allowed card schemes in case you want to limit the list"
            ]
          }
        },
        {
          "INVOICE": {
            "invoiceItems": [
              {
                "itemId": "invoiceItems: Applicable for Walley B2C and B2B invoice payments. itemId: The Product ID of the item",
                "description": "Product description",
                "quantity": 1,
                "quantityUnit": "Optional: Default pc",
                "itemPrice": "Unit price incl. VAT",
                "taxPercentage": "VAT percentage",
                "itemPriceExclTax": "Optional: Unit price excl. VAT",
                "taxAmount": "Optional: Tax amount",
                "itemUrl": "Optional: Product URL",
                "imageUrl": "Optional: Product image URL"
              }
            ],
            "B2C": {},
            "B2B": {
              "buyer": "Buyer information",
              "costCenter": "Optional cost center reference"
            }
          }
        },
        {
          "MERCHANTWALLET": [ 
            {
              "walletId": "MERCHANTWALLET object: Applicable to merchant specific wallet based on Aera´s white label wallet. walletId: Unique ID provided by Wallet Service Provider",
              "dpaId": "Optional: If omitted, all DPAs for given wspId are available",
              "claimedUserIds": [
                {
                  "cuid": "Claimed User ID",
                  "cuidType": "LOYALTY | SDKID | DYNAMIC_SDKID | MOBILE"
                }
              ]
            }
          ]
        },
        {
          "VIPPS": {
            "mobileNo": "VIPPS object: Optional. mobileNo: Optional Conditional Only when pushing payment request directly to user's mobile for confirmation. Vipps only allows it for limited use cases where redirection is not feasible. For example, when it is not possible to show the landing page, when the payment is initiated on a device that the user does not own or control. This includes: Not on the users phone, Not on the users computer, On a device that has no user-facing display where the landing page can be shown, such as physical points of sale (POS) solutions, vending machines, etc."
          }
        }
      ]
    }
  }
}

Response Structure

The response contains session metadata and checkout information.

{
  "responseInfo": {
    "responseCode": "000",
    "responseText": "Approved"
  },
  "sessionInfo": {
    "pspReference": "018f7a2e-8f5c-7a9b-b123-123456789abc",
    "createdAt": "2026-03-01T10:15:30Z",
    "expiredAt": "2026-03-01T10:30:30Z",
    "checkoutUrl": "https://checkout.aera.com/session/abc123"
  }
}

Field reference: Create Checkout Session

HTTP Headers

🔒

Keep your x-api-key and Authorization token secret. Store them in environment variables or a secrets manager — never hard-code credentials in source files, client-side code, public repositories, or browser requests. Rotate compromised keys immediately through the Aera dashboard.

FieldTypeRequiredDefaultDescription
x-api-keystringYesAPI key assigned by Aera.
merchant-idstringYesMerchant ID assigned by Aera.
idempotency-keystring (UUID v7)YesUnique key identifying this request. Safe retries must reuse the same key.
AuthorizationstringYesBearer <access token>
AcceptstringYesapplication/vnd.payments.v1+jsonAPI versioned accept header.
Content-TypestringYesapplication/vnd.payments.v1+jsonAPI versioned content type.

Request body

merchantInfo object

FieldTypeRequiredDefaultDescription
successRedirectUrlstring (url)YesWhere the shopper is redirected after a successful payment.
cancelRedirectUrlstring (url)YesWhere the shopper is redirected if they cancel checkout.
errorRedirectUrlstring (url)YesWhere the shopper is redirected if checkout fails.
webhookUrlstring (url)NoWebhook URL override for this session. Use to receive notifications at a different URL than your default. Must match the configured domain rules
uiObjectNoOptional object used to configure how the checkout experience is rendered. Include this object only when using the embedded checkout form.
If omitted, the default behavior is redirect to the Aera Hosted Checkout Page.

ui

FieldTypeRequiredDescription
modestringYes (when ui is provided)Checkout rendering mode. Set to EMBED to render Aera’s hosted checkout form inside the merchant page.
originstring (URL)Yes (when mode = EMBED)The merchant’s origin (scheme + host, e.g. https://merchant.example). Used for security validation and postMessage communication.

transactionData object

FieldTypeRequiredDefaultDescription
merchantReferencestringYesMerchant reference (for example, order number).
immediateCapturebooleanNofalseIf true, authorizes and captures immediately. If false, authorizes first and requires capture later (if applicable).
forceAuthenticationbooleanNofalsetrue if explicit authentication (no frictionless) is requested by the merchant. If false, the issuer, acquirer or PSP decides if explicit authentication is required. If the shopper chooses to store the payment instrument forceAuthentication is implicit.
storePaymentInstrumentbooleanNotrueEnumerations:
true- storing the payment instrument is mandated
false- shopper may choose to store payment instrument.
Ignored if the merchant has not purchased the Store payment instrument service.
splitShipmentbooleanNofalseSet totrueif shipment potentially can be split into multiple shipments. Used to exclude payment methods not supporting split shipments / multiple captures. Ignored if immediateCapture = true
amountDetailsobjectYesAmount object (minor units).
transactionData.amountDetails
FieldTypeRequiredDefaultDescription
amountintegerYesGross amount in minor units (for example, 19900 = NOK 199.00).
currencystring (ISO 4217)YesCurrency code (for example, NOK), must be the same as the merchant currency.

paymentInstrumentsProfileData object (optional)

Optional object used to retrieve and manage stored payment instruments ("payment instruments on file"). Use this object if you want to present stored payment instruments or preselect an instrument.

FieldTypeRequiredDescription
merchantShopperIdstringConditionalMerchant-provided end-user identifier (e.g. loyalty number or phone). Required when retrieving stored instruments by merchant shopper ID.
pspShopperIdstring (uuid)ConditionalPSP-assigned shopper ID. Required when retrieving stored instruments by PSP shopper ID.
paymentInstrumentReferencestringNoPre-selects a specific stored payment instrument. Use to skip instrument selection in the checkout UI. The payment instrument is not displayed in the checkout UI. If low-value exemption or frictionless authentication is not requried, the payment becomes a one-click.
allowStoredInstrumentsOnlybooleanNoIf true, only stored instruments are allowed (no new instrument entry allowed). Default: false. Ignored if paymentInstrumentReference is included.


paymentMethodInfoobject

Controls which payment methods are available for this checkout session and allows method-specific configuration.

FieldTypeRequiredDescription
paymentMethodWhitelistarray(string)NoRestricts which payment methods are offered for this session (allowlist). If omitted, all enabled methods for the merchant may be presented to the shopper.
paymentMethodDetailsarray(object)NoPer-method configuration. Include only when overriding defaults or passing method-specific data (for example, card scheme restrictions or invoice line items).

Method-specific configuration (paymentMethodInfo.paymentMethodDetails)

CARD object

FieldTypeRequiredDefaultDescription
cardSchemeWhitelistarray(string)NoLimits allowed card schemes for this payment (acts as an allowlist, for example ["VISA","MASTERCARD","AMEX"]).

INVOICE object

FieldTypeRequiredDefaultDescription
invoiceItemsarray(object)NoLine items sent to invoice providers. Schema may vary by provider.
B2CobjectNo{}Consumer invoice details. Schema may vary by provider.
B2BobjectNoBusiness invoice details. Schema may vary by provider.
INVOICE.invoiceItems[] object
FieldTypeRequiredDefaultDescription
itemIdstringYesProduct identifier.
descriptionstringYesProduct description.
quantitynumberYesQuantity.
quantityUnitstringNopcUnit of measure.
itemPricenumberYesUnit price incl. VAT.
taxPercentagenumberYesVAT percentage.
itemPriceExclTaxnumberNoUnit price excl. VAT.
taxAmountnumberNoTax amount.
itemUrlstring (url)NoProduct URL.
imageUrlstring (url)NoProduct image URL.
INVOICE.B2B object
FieldTypeRequiredDefaultDescription
buyerobject/stringYesBuyer information. Schema may vary by provider.
costCenterstringNoCost center reference for B2B invoice reconciliation.

MERCHANTWALLET

FieldTypeRequiredDefaultDescription
walletIdstring (uuid)YesWallet Service Provider identifier.
dpaIdstringNoDPA identifier. If omitted, all DPAs for the wspId may be eligible.
claimedUserIdsarray(object)NoClaimed identifiers used to link a shopper to a wallet profile.
MERCHANTWALLET.claimedUserId
FieldTypeRequiredDefaultDescription
cuidstringYesClaimed user identifier.
cuidTypestringYesIdentifier type (for example LOYALTY, SDKID, DYNAMIC_SDKID, MOBILE).

VIPPS

FieldTypeRequiredDefaultDescription
mobileNostringNoMoble number.

Note: mobileNo is included only when pushing payment request directly to user´s mobile for confirmation. Vipps only allow it for limited use cases where redirection is not feasible. For example, when it is not possible to show the landing page, when the payment is initiated on a device that the user does not own or control. This includes: Not on the user's phone, Not on the user's computer, On a device that has no user-facing display where the landing page can be shown, such as physical points of sale (POS) solutions, vending machines, etc.

Field reference: response

High-level processing result information.

FieldTypeRequiredDescription
responseCodestring (3 digits)YesResponse code from a predefined list.
responseTextstringYesHuman-readable description of the response code.

sessionInfo

Checkout session metadata.

FieldTypeRequiredDescription
pspReferencestring (UUID v7)YesUnique session identifier generated by Aera. Use this reference for all subsequent operations (capture, cancel, refund, status).
createdAtstring (ISO 8601)YesTimestamp when the session was created (UTC).
expiredAtstring (ISO 8601)YesTimestamp when the session expires (UTC).
checkoutUrlstring (URL)YesURL used to redirect the customer to initiate the hosted checkout session.



What’s Next

Did this page help you?