Create Payment Session

🚧

Early release: preliminary docs and specs

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

Creates a new checkout session and initializes a payment 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 callback 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": {
    "merchantData": {
      "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",
      "callbackUrl": "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"
      },
      "orderData": {
        "orderItems": [
          {
            "itemId": "invoice: Applicable for invoice based payment methods like 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"
          }
        ]
      }
    },
    "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"
    },
    "shopperData": {
      "name": "Name of the shopper",
      "email": "Email of the shopper",
      "phoneNumber": "Phone number of the merchant",
      "shippingAddress": {
      "street": "Street name",
      "houseNumberOrName": "House number (or name) in the street",
      "city": "Name of the city",
      "postalCode": "Postal/ZIP code",
      "country": "Country of the shipping address"
      }
     },
    "paymentMethodData": {
      "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"
            ]
          }
        },
        {
          "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"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

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-keystringYes–API key assigned by Aera.
merchant-idstringYes–Merchant ID assigned by Aera.
idempotency-keystring (UUID v7)Yes–Unique key identifying this request. Safe retries must reuse the same key.
AuthorizationstringYes–Bearer <access token>
AcceptstringYesapplication/vnd.payments.v1+jsonAPI versioned accept header.
Content-TypestringYesapplication/vnd.payments.v1+jsonAPI versioned content type.


Request body

merchantData object

FieldTypeRequiredDefaultDescription
successRedirectUrlstring (url)Yes–Where the shopper is redirected after a successful payment.
cancelRedirectUrlstring (url)Yes–Where the shopper is redirected if they cancel checkout.
errorRedirectUrlstring (url)Yes–Where the shopper is redirected if checkout fails.
callbackUrlstring (url)No–Webhook URL override for this session. Use to receive notifications at a different URL than your default. Must match the configured domain rules
uiObjectNo–Optional 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.


merchantData.ui object

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
merchantReferencestringYes–Merchant 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
amountDetailsobjectYes–Transanction amount object (minor units).
paymentInstrumentsProfileDataobjectNo
orderDataobjectConditional–Order data, required for payment methods requiring order items, e.g. invoice payment methods
shopperDataobjectNoData about the shopper, forwarded to the acquirer or authentication provider to avoid requesting the shopper to retype known data or to simplify shopper authentication
paymentMethodDataobjectNo


tranctionData.amountDetails object

FieldTypeRequiredDefaultDescription
amountintegerYes–Gross amount in minor units (for example, 19900 = NOK 199.00).
currencystring (ISO 4217)Yes–Currency code (for example, NOK), must be the same as the merchant currency.


tranctionData.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.


tranctionData.orderData object

FieldTypeRequiredDefaultDescription
orderItemsarray(object)No–Line items sent to payment providers that requires order items, e.g. invoice payment providers. Schema may vary by provider.


tranctionData.orderData.orderItems[] object
FieldTypeRequiredDefaultDescription
itemIdstringYes–Product identifier.
descriptionstringYes–Product description.
quantitynumberYes–Quantity.
quantityUnitstringNopcUnit of measure.
itemPricenumberYes–Unit price incl. VAT.
taxPercentagenumberYes–VAT percentage.
itemPriceExclTaxnumberNo–Unit price excl. VAT.
taxAmountnumberNo–Tax amount.
itemUrlstring (url)No–Product URL.
imageUrlstring (url)No–Product image URL.

tranctionData.shopperData object (optional)

FieldTypeRequiredDefaultDescription
firstNamestringNo–First name of the shopper.
lastNamestringNo–Last name of the shopper.
emailstringNo-Email address of the shopper.
phoneNumberstringNo–Phone number of the shopper, either a B2C shopper or the person representing a company for B2B shoppers.
shippingAddressobjectNo-Shipping address of the shopper.
billingAddressobjectNo-Billing address of the shopper.
additionalDataobjectNoAdditional data, primarily for B2B shoppers.


tranctionData.shopperData.shippingAddress object (optional)

FieldTypeRequiredDefaultDescription
addressstringNo–Address (or first address line).
address2stringNo-Second address line, if needed.
citystringNo–Shipping address city.
postalCodestringNo-Shipping address postal/ZIP code.
countryCodestringNo-The two-character ISO-3166-1 alpha-2 country code. For example, NO
coAddressstringNo-The care-of (c/o address line)
companyNamestringNo-The company name for B2B customers.


tranctionData.shopperData.billingAddress object (optional)

FieldTypeRequiredDefaultDescription
addressstringNo–Address (or first address line).
address2stringNo-Second address line, if needed.
citystringNo–Shipping address city.
postalCodestringNo-Shipping address postal/ZIP code.
countryCodestringNo-The two-character ISO-3166-1 alpha-2 country code. For example, NO
coAddressstringNo-The care-of (c/o address line)
companyNamestringNo-The company name for B2B customers.

tranctionData.shopperData.additionalData object (optional)

FieldTypeRequiredDefaultDescription
shopperTypestringNo–B2B or B2C
contactPersonNamestringNo-Name of the contact person if different from the shopperData.name
companyIdstringNo-ID of the shopper company as known by the acquirer or invoice payment provider
contractIdstringNo-ID of the shopper contract as known by the acquirer or invoice payment provider.
vatNumberstringNo–VAT-number/ID of the shopper.
peppolIdstringNo-PEPPOL-ID used for electronic invoicing
countrystringNo-The two-character ISO-3166-1 alpha-2 country code. For example, NO


tranctionData.paymentMethodDataobject

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. Currently supported values are CARD, VIPPS, WALLEY, APPLEPAY.
paymentMethodDetailsarray(object)NoPer-method configuration. Include only when overriding defaults or passing method-specific data (for example, card scheme restrictions or order data).


Method-specific configuration (transacationData.paymentMethodData.paymentMethodDetails)

CARD object

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


transactionData.paymentMethodData.paymentMethodDetails.VIPPSobject
FieldTypeRequiredDefaultDescription
mobileNostringNo–Mobile number.
paymentDescriptionstringNo–Short description of the payment, displayed in the Vipps payment window.

transactionData.paymentMethodData.paymentMethodDetails.MERCHANTWALLETobject

FieldTypeRequiredDefaultDescription
walletIdstring (uuid)Yes–Wallet Service Provider identifier.
dpaIdstringNo–Digital Payment Application identifier. If omitted, all DPAs for the walletId may be eligible.
claimedUserIdsarray(object)Yes–Claimed identifiers used to link a shopper to a wallet profile.


MERCHANTWALLET.claimedUserIdsobject
FieldTypeRequiredDefaultDescription
claimedUserIdstringYes–Claimed user identifier.
claimedUserIdTypestringYes–Identifier type (for example LOYALTY, SDKID, DYNAMIC_SDKID, MOBILE).

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?