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
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": {
"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-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
merchantInfo object
merchantInfo 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. |
webhookUrl | 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. |
ui
ui| 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 | – | Amount object (minor units). |
transactionData.amountDetails
transactionData.amountDetails| 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. |
paymentInstrumentsProfileData object (optional)
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. |
paymentMethodInfoobject
paymentMethodInfoobjectControls 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. |
paymentMethodDetails | array(object) | No | Per-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)
paymentMethodInfo.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"]). |
INVOICE object
INVOICE object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
invoiceItems | array(object) | No | – | Line items sent to invoice providers. Schema may vary by provider. |
B2C | object | No | {} | Consumer invoice details. Schema may vary by provider. |
B2B | object | No | – | Business invoice details. Schema may vary by provider. |
INVOICE.invoiceItems[] object
INVOICE.invoiceItems[] 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. |
INVOICE.B2B object
INVOICE.B2B object| Field | Type | Required | Default | Description |
|---|---|---|---|---|
buyer | object/string | Yes | – | Buyer information. Schema may vary by provider. |
costCenter | string | No | – | Cost center reference for B2B invoice reconciliation. |
MERCHANTWALLET
MERCHANTWALLET| Field | Type | Required | Default | Description |
|---|---|---|---|---|
walletId | string (uuid) | Yes | – | Wallet Service Provider identifier. |
dpaId | string | No | – | DPA identifier. If omitted, all DPAs for the wspId may be eligible. |
claimedUserIds | array(object) | No | – | Claimed identifiers used to link a shopper to a wallet profile. |
MERCHANTWALLET.claimedUserId
MERCHANTWALLET.claimedUserId| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cuid | string | Yes | – | Claimed user identifier. |
cuidType | string | Yes | – | Identifier type (for example LOYALTY, SDKID, DYNAMIC_SDKID, MOBILE). |
VIPPS
VIPPS| Field | Type | Required | Default | Description |
|---|---|---|---|---|
mobileNo | string | No | – | Moble 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.
| 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 13 days ago