Create Payment Session
Early release: preliminary docs and specsOnline 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
pspReferenceandcheckoutUrlfor 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-keyandAuthorizationtoken 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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
x-api-key | string | Yes | – | API key assigned by Aera. |
merchant-id | string | Yes | – | Merchant ID assigned by Aera. |
idempotency-key | string (UUID v7) | Yes | – | Unique key identifying this request. Safe retries must reuse the same key. |
Authorization | string | Yes | – | Bearer <access token> |
Accept | string | Yes | application/vnd.payments.v1+json | API versioned accept header. |
Content-Type | string | Yes | application/vnd.payments.v1+json | API versioned content type. |
Request body
merchantData object
merchantData object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
successRedirectUrl | string (url) | Yes | – | Where the shopper is redirected after a successful payment. |
cancelRedirectUrl | string (url) | Yes | – | Where the shopper is redirected if they cancel checkout. |
errorRedirectUrl | string (url) | Yes | – | Where the shopper is redirected if checkout fails. |
callbackUrl | string (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 |
ui | Object | No | – | 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
merchantData.ui object| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Yes (when ui is provided) | Checkout rendering mode. Set to EMBED to render Aera’s hosted checkout form inside the merchant page. |
origin | string (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
transactionData object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
merchantReference | string | Yes | – | Merchant reference (for example, order number). |
immediateCapture | boolean | No | false | If true, authorizes and captures immediately. If false, authorizes first and requires capture later (if applicable). |
forceAuthentication | boolean | No | false | true 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. |
storePaymentInstrument | boolean | No | true | Enumerations:true- storing the payment instrument is mandatedfalse- shopper may choose to store payment instrument. Ignored if the merchant has not purchased the Store payment instrument service. |
splitShipment | boolean | No | false | Set totrueif shipment potentially can be split into multiple shipments. Used to exclude payment methods not supporting split shipments / multiple captures. Ignored if immediateCapture = true |
amountDetails | object | Yes | – | Transanction amount object (minor units). |
paymentInstrumentsProfileData | object | No | ||
orderData | object | Conditional | – | Order data, required for payment methods requiring order items, e.g. invoice payment methods |
shopperData | object | No | Data about the shopper, forwarded to the acquirer or authentication provider to avoid requesting the shopper to retype known data or to simplify shopper authentication | |
paymentMethodData | object | No |
tranctionData.amountDetails object
tranctionData.amountDetails object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
amount | integer | Yes | – | Gross amount in minor units (for example, 19900 = NOK 199.00). |
currency | string (ISO 4217) | Yes | – | Currency code (for example, NOK), must be the same as the merchant currency. |
tranctionData.paymentInstrumentsProfileData object (optional)
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.
| Field | Type | Required | Description |
|---|---|---|---|
merchantShopperId | string | Conditional | Merchant-provided end-user identifier (e.g. loyalty number or phone). Required when retrieving stored instruments by merchant shopper ID. |
pspShopperId | string (uuid) | Conditional | PSP-assigned shopper ID. Required when retrieving stored instruments by PSP shopper ID. |
paymentInstrumentReference | string | No | Pre-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. |
allowStoredInstrumentsOnly | boolean | No | If true, only stored instruments are allowed (no new instrument entry allowed). Default: false. Ignored if paymentInstrumentReference is included. |
tranctionData.orderData object
tranctionData.orderData object | Field | Type | Required | Default | Description |
|---|---|---|---|---|
orderItems | array(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
tranctionData.orderData.orderItems[] object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
itemId | string | Yes | – | Product identifier. |
description | string | Yes | – | Product description. |
quantity | number | Yes | – | Quantity. |
quantityUnit | string | No | pc | Unit of measure. |
itemPrice | number | Yes | – | Unit price incl. VAT. |
taxPercentage | number | Yes | – | VAT percentage. |
itemPriceExclTax | number | No | – | Unit price excl. VAT. |
taxAmount | number | No | – | Tax amount. |
itemUrl | string (url) | No | – | Product URL. |
imageUrl | string (url) | No | – | Product image URL. |
tranctionData.shopperData object (optional)
tranctionData.shopperData object (optional)| Field | Type | Required | Default | Description |
|---|---|---|---|---|
firstName | string | No | – | First name of the shopper. |
lastName | string | No | – | Last name of the shopper. |
email | string | No | - | Email address of the shopper. |
phoneNumber | string | No | – | Phone number of the shopper, either a B2C shopper or the person representing a company for B2B shoppers. |
shippingAddress | object | No | - | Shipping address of the shopper. |
billingAddress | object | No | - | Billing address of the shopper. |
additionalData | object | No | Additional data, primarily for B2B shoppers. |
tranctionData.shopperData.shippingAddress object (optional)
tranctionData.shopperData.shippingAddress object (optional)| Field | Type | Required | Default | Description |
|---|---|---|---|---|
address | string | No | – | Address (or first address line). |
address2 | string | No | - | Second address line, if needed. |
city | string | No | – | Shipping address city. |
postalCode | string | No | - | Shipping address postal/ZIP code. |
countryCode | string | No | - | The two-character ISO-3166-1 alpha-2 country code. For example, NO |
coAddress | string | No | - | The care-of (c/o address line) |
companyName | string | No | - | The company name for B2B customers. |
tranctionData.shopperData.billingAddress object (optional)
tranctionData.shopperData.billingAddress object (optional)| Field | Type | Required | Default | Description |
|---|---|---|---|---|
address | string | No | – | Address (or first address line). |
address2 | string | No | - | Second address line, if needed. |
city | string | No | – | Shipping address city. |
postalCode | string | No | - | Shipping address postal/ZIP code. |
countryCode | string | No | - | The two-character ISO-3166-1 alpha-2 country code. For example, NO |
coAddress | string | No | - | The care-of (c/o address line) |
companyName | string | No | - | The company name for B2B customers. |
tranctionData.shopperData.additionalData object (optional)
tranctionData.shopperData.additionalData object (optional)| Field | Type | Required | Default | Description |
|---|---|---|---|---|
shopperType | string | No | – | B2B or B2C |
contactPersonName | string | No | - | Name of the contact person if different from the shopperData.name |
companyId | string | No | - | ID of the shopper company as known by the acquirer or invoice payment provider |
contractId | string | No | - | ID of the shopper contract as known by the acquirer or invoice payment provider. |
vatNumber | string | No | – | VAT-number/ID of the shopper. |
peppolId | string | No | - | PEPPOL-ID used for electronic invoicing |
country | string | No | - | The two-character ISO-3166-1 alpha-2 country code. For example, NO |
tranctionData.paymentMethodDataobject
tranctionData.paymentMethodDataobjectControls which payment methods are available for this checkout session and allows method-specific configuration.
| Field | Type | Required | Description |
|---|---|---|---|
paymentMethodWhitelist | array(string) | No | Restricts 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. |
paymentMethodDetails | array(object) | No | Per-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)
transacationData.paymentMethodData.paymentMethodDetails)CARD object
CARD object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cardSchemeWhitelist | array(string) | No | – | Limits allowed card schemes for this payment (acts as an allowlist, for example ["VISA","MASTERCARD","AMEX"]). |
transactionData.paymentMethodData.paymentMethodDetails.VIPPSobject
transactionData.paymentMethodData.paymentMethodDetails.VIPPSobject| Field | Type | Required | Default | Description |
|---|---|---|---|---|
mobileNo | string | No | – | Mobile number. |
paymentDescription | string | No | – | Short description of the payment, displayed in the Vipps payment window. |
transactionData.paymentMethodData.paymentMethodDetails.MERCHANTWALLETobject
transactionData.paymentMethodData.paymentMethodDetails.MERCHANTWALLETobject| Field | Type | Required | Default | Description |
|---|---|---|---|---|
walletId | string (uuid) | Yes | – | Wallet Service Provider identifier. |
dpaId | string | No | – | Digital Payment Application identifier. If omitted, all DPAs for the walletId may be eligible. |
claimedUserIds | array(object) | Yes | – | Claimed identifiers used to link a shopper to a wallet profile. |
MERCHANTWALLET.claimedUserIdsobject
MERCHANTWALLET.claimedUserIdsobject| Field | Type | Required | Default | Description |
|---|---|---|---|---|
claimedUserId | string | Yes | – | Claimed user identifier. |
claimedUserIdType | string | Yes | – | Identifier type (for example LOYALTY, SDKID, DYNAMIC_SDKID, MOBILE). |
Field reference: response
High-level processing result information.
| Field | Type | Required | Description |
|---|---|---|---|
responseCode | string (3 digits) | Yes | Response code from a predefined list. |
responseText | string | Yes | Human-readable description of the response code. |
sessionInfo
Checkout session metadata.
| Field | Type | Required | Description |
|---|---|---|---|
pspReference | string (UUID v7) | Yes | Unique session identifier generated by Aera. Use this reference for all subsequent operations (capture, cancel, refund, status). |
createdAt | string (ISO 8601) | Yes | Timestamp when the session was created (UTC). |
expiredAt | string (ISO 8601) | Yes | Timestamp when the session expires (UTC). |
checkoutUrl | string (URL) | Yes | URL used to redirect the customer to initiate the hosted checkout session. |
Updated 2 days ago