Skip to main content

GetPaymentSessionResponse

session object
iduuid

The ID of the payment session

subscriptionIduuidnullable

The subscription id related to the session, this can either be a new ID for new subscriptions or the given ID of a previous subscription which needs to be updated.

amountinteger

The transaction amount in minor units (e.g., 1095 = 10.95 DKK)

attributes objectnullable

Pass-through data which will be returned back to the merchant in any webhook.

property name*anynullable

Pass-through data which will be returned back to the merchant in any webhook.

exemptionsstring[]

List of exemptions to apply when available. Note exemptions may cause liability shift from the issuer to the merchant.

currencystring

The currency of the payment. For Danish Kroner defined as DKK.

Possible values: Value must match regular expression ^[A-Z]{3}$

expiresAtdate-time

The expiration time of the payment session. After this time the session can no longer be used and a new session must be created.

instantCapturestring

The instant capture mode.

Possible values: [OFF, VOID, NO_VOID]

maxAttemptsinteger

The maximum number of transaction attempts allowed for the session

attemptsinteger

The current number of transaction attempts so far.

minimumAgeinteger

The minimum age required. If not null and ePay Verify is enabled on your account, the cardholder will be prompted to verify their age using local online IDs such as MitID in Denmark.

ageVerifiedboolean

Is true once the customers age has been verified to be at least equal to minimumAge parameter.

reportFailureboolean

Boolean flag to enable / disable receiving webhook notifications for failed transactions.

reportExpiredboolean

Boolean flag to enable / disable receiving webhook notifications for sessions that reach the expired state.

dynamicAmountboolean

Boolean flag to enable / disable dynamic amounts, allowing the client to determine the transaction amount. This is generally not recommended for most merchants.

notificationUrluri

The URL to receive webhooks related to transaction attempts

preAuthUrlurinullable

Optional URL to receive a webhook just before authorization is attempted. Can be used to update or reject the transaction. This is often used by merchants integrating external risk tooling to trigger 3DS challenges depending on the payment.

successUrluri

The URL to redirect the client on successful payment attempts

returnUrlurinullable

The URL to where the browser is returned, when clicking the back button in the Payment Window. This overrides the default defined in the payment window configuration and supports url templating. Max length is 1024.

Only used in Payment Window integrations.

Possible values: non-empty and <= 1024 characters

failureUrluri

The URL to redirect the client on failed payment attempts when no more attempts are possible.

retryUrlurinullable

The URL to redirect the client on failed payment attempts when more attempts are possible. If null, then failureUrl is used instead.

customerIdstringnullable

The ID of the cardholder. This field is required to enable stored cards. Do not use any "guest" customer ids. Customer ids must be unique for each customer and secured behind authentication.

pointOfSaleIduuid

The ID of the associated point of sale

referencestringnullable

The transaction reference - Typically the order id.

statestring

The state of the transaction

Possible values: [PENDING, PROCESSING, COMPLETED, EXPIRED]

textOnStatementstring

The text to display on the cardholders bank statement

Possible values: non-empty and <= 39 characters

scaModestring

The chosen SCA mode. This can be used to control the level of cardholder authentication performed before the transaction is authorized.

Possible values: [SKIP, NORMAL, FORCE]

timeoutinteger

The number of minutes the session is available.

createdAtdate-time

The time of creation

transaction objectnullable

The transaction associated with the payment session.

This field is only populated when the session state is COMPLETED, and will contain the successful transaction that finalized the payment session.

In all other cases—such as when the session is still PENDING, PROCESSING, or has EXPIRED - this field will be null.

idstring

The ID of the transaction

Example: LDG7M4WW44G
subscriptionIduuidnullable

The ID of the associated subscription

Example: 0197c07b-3f6d-7be2-b848-702b08958128
billingAgreementChargeIduuidnullable

The ID of any associated subscription billing charge. Will be null if the transaction was not an automatic charge made on a billing agreement.

Example: 019a727b-987f-7768-a59e-71af920ef81f
statestring

The current state of the transaction. See our Core Concepts page.

Possible values: [PENDING, PROCESSING, SUCCESS, FAILED]

errorCodestringnullable

If the transaction has failed, this contains the associated error code explaining what went wrong.

externalStatusCodes objectnullable

A nullable object containing any known external status codes, such as the status code from the acquirer or the network. This can be useful for merchants who want to be able to react to very specific rejection reasons.

terminalstring

The status code from the terminal. The possible values depend on the terminal provider such as SoftPay. The key is only present if the value is known to ePay, and processed on a physical in-person terminal.

acquirerstring

The status code from the acquirer. The possible values depend on processing acquirer. The key is only present if the value is known to ePay.

networkstring

The status code from the scheme network. The field is only used for card based payments but stays consistent between acquirers. The key is only present if the value is known to ePay.

scastring

A unified status code representing the result of the Strong Customer Authentication (SCA) flow, such as 3DS. The code is built by concatenating the challenge status (transStatus) and reason code (transStatusReason) from the two steps of the 3DS protocol.

CodeMeaning
CTransaction was challenged
NTransaction was rejected
YTransaction was approved
UTechnical issues
IInformational Only (No authentication performed)

The reason code (transStatusReason) is appended if present, e.g., 07.

Examples:

  • Y - Frictionless approval
  • CY - Challenged then approved
  • CN07 - Challenged then rejected due to reason 07
  • N07 - Rejected without a challenge due to reason 07
createdAtdate-time

The time of creation

sessionIdstringnullable

The ID of the associated session. This will be null for any MIT transactions.

paymentMethodIduuid

The ID of the associated payment method

paymentMethodTypePaymentMethodType (string)

The type of the payment method.

Possible values: [CARD, VIPPS_MOBILEPAY, MOBILEPAY_ONLINE, APPLE_PAY, GOOGLE_PAY, SWISH, VIABILL, ANYDAY, KLARNA]

Example: CARD
paymentMethodSubTypePaymentMethodSubType (string)nullable

The sub type of the associated payment method. For card based payments, this will contain the name of the scheme, such as Visa or Mastercard. The card scheme name formatted with a uppercase starting character. For non-card based payments the field vary depending on the requirements of the payment method.

Possible values: [Visa, Mastercard, Maestro, Dankort, VisaDankort, Discover, UnionPay, Electron, Amex, JCB]

Example: Visa
paymentMethodExpirydatenullable

The expiration date of the associated payment method.
Although payment cards are specified by a month and year (MM/YY), this value is returned as a full date (YYYY-MM-DD) representing the last day of the expiration month. Example: "2030-05-31" for a card expiring in May 2030.

paymentMethodDisplayTextstring

A cardholder friendly text to help them identify the payment method. For cards this will be a masked version of the card number.

paymentMethodHolderNamestringnullable

Contains the entered cardholder name of the optional "name" field. Will be null if the field is not rendered.

scaModestring

The SCA mode of the transaction.

Possible values: [SKIP, NORMAL, FORCE]

customerIdstringnullable

The merchant customer id of the transaction. This field is required to enable advanced features such as storing a card for later reuse. Do not use any "guest" customer ids. Customer ids must be unique for each customer and must be protected by authentication.

amountinteger

The transaction amount in minor units (e.g., 1095 = 10.95 DKK)

feeinteger

The applied transaction fee in minor units. The fee is included in the amount field. To get the original amount you must subtract fee from amount. Fees are only applied if surcharge is configured in the ePay backoffice.

Fees are calculated during transaction processing and as such is always 0 when initially created during MIT transactions.

currencystring

The currency of the transaction in ISO 4217 alpha-3. DKK for danish kroner.

instantCapturestring

The instant capture mode.

Possible values: [OFF, VOID, NO_VOID]

notificationUrluri

The URL to receive webhook notifications of any transaction attempts. May contain templating variables.

Possible values: <= 1024 characters

pointOfSaleIduuid

The ID of the associated point of sale

referencestringnullable

The merchant reference of the transaction, this is often used for the order id.

textOnStatementstringnullable

The text to show on the cardholder bank statement

Possible values: non-empty and <= 39 characters

exemptionsstring[]

The list of exemptions to apply when possible. Note that exemptions may shift liability from the issuer to the merchant.

Example: ["LVT","TRA"]
attributes object

A list of pass-through parameters that will be sent back to the merchant for following any webhooks

property name*any

A list of pass-through parameters that will be sent back to the merchant for following any webhooks

clientIpstring

The ip (ipv4/ipv6) of the cardholder making the transaction. The IP is captured by ePay at the initialization of the transaction client-side. Can be empty.

Example: 52.212.176.122
clientCountrystring

The detected origin country (Alpha-2) based on the clientIp property. Can be empty.

  • Data derived from GeoLite2 by MaxMind.
Example: DK
typestring

The type of transaction.

Possible values: [PAYMENT, PAYOUT, MOTO]

GetPaymentSessionResponse
{
"session": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": 0,
"attributes": {},
"exemptions": [
"string"
],
"currency": "string",
"expiresAt": "2024-07-29T15:51:28.071Z",
"instantCapture": "OFF",
"maxAttempts": 0,
"attempts": 0,
"minimumAge": 0,
"ageVerified": true,
"reportFailure": true,
"reportExpired": true,
"dynamicAmount": true,
"notificationUrl": "string",
"preAuthUrl": "string",
"successUrl": "string",
"returnUrl": "string",
"failureUrl": "string",
"retryUrl": "string",
"customerId": "string",
"pointOfSaleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reference": "string",
"state": "PENDING",
"textOnStatement": "string",
"scaMode": "SKIP",
"timeout": 0,
"createdAt": "2024-07-29T15:51:28.071Z"
},
"transaction": {
"id": "LDG7M4WW44G",
"subscriptionId": "0197c07b-3f6d-7be2-b848-702b08958128",
"billingAgreementChargeId": "019a727b-987f-7768-a59e-71af920ef81f",
"state": "PENDING",
"errorCode": "string",
"externalStatusCodes": {
"terminal": "string",
"acquirer": "string",
"network": "string",
"sca": "string"
},
"createdAt": "2024-07-29T15:51:28.071Z",
"sessionId": "string",
"paymentMethodId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"paymentMethodType": "CARD",
"paymentMethodSubType": "Visa",
"paymentMethodExpiry": "2024-07-29",
"paymentMethodDisplayText": "string",
"paymentMethodHolderName": "string",
"scaMode": "SKIP",
"customerId": "string",
"amount": 0,
"fee": 0,
"currency": "string",
"instantCapture": "OFF",
"notificationUrl": "string",
"pointOfSaleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reference": "string",
"textOnStatement": "string",
"exemptions": [
"LVT",
"TRA"
],
"attributes": {},
"clientIp": "52.212.176.122",
"clientCountry": "DK",
"type": "PAYMENT"
}
}