Looking for ePay classic docs? Go to docs.epay.dk
ePay documentationDocsePay documentation
Sessions

Get Payment Session

GET
/public/api/v1/sessions/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

idstring
Required

ID of the session to look up.

Format:
uuid

Header Parameters

Idempotency-Keystring

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/public/api/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678"
{  "session": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",    "amount": 0,    "attributes": {      "property1": null,      "property2": null    },    "exemptions": [      "string"    ],    "allowedPaymentMethods": [      "CARD",      "VIPPS_MOBILEPAY"    ],    "currency": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "instantCapture": "OFF",    "maxAttempts": 0,    "attempts": 0,    "minimumAge": 0,    "ageVerified": true,    "reportFailure": true,    "reportExpired": true,    "dynamicAmount": true,    "notificationUrl": "http://example.com",    "preAuthUrl": "http://example.com",    "successUrl": "http://example.com",    "returnUrl": "http://example.com",    "failureUrl": "http://example.com",    "retryUrl": "http://example.com",    "customerId": "string",    "pointOfSaleId": "be6bff4f-7fac-43c0-9f6b-cf2cd45ed7d1",    "reference": "string",    "state": "PENDING",    "textOnStatement": "string",    "scaMode": "SKIP",    "timeout": 0,    "createdAt": "2019-08-24T14:15:22Z"  },  "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": "2019-08-24T14:15:22Z",    "sessionId": "string",    "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",    "paymentMethodType": "CARD",    "paymentMethodSubType": "Visa",    "paymentMethodExpiry": "2019-08-24",    "paymentMethodDisplayText": "string",    "paymentMethodHolderName": "string",    "scaMode": "SKIP",    "customerId": "string",    "amount": 0,    "fee": 0,    "currency": "string",    "instantCapture": "OFF",    "notificationUrl": "http://example.com",    "pointOfSaleId": "be6bff4f-7fac-43c0-9f6b-cf2cd45ed7d1",    "reference": "string",    "textOnStatement": "string",    "exemptions": [      "LVT",      "TRA"    ],    "attributes": {      "property1": null,      "property2": null    },    "clientIp": "52.212.176.122",    "clientCountry": "DK",    "type": "PAYMENT"  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}
{  "errorCode": "VALIDATION_ERROR",  "message": "Input validation errors",  "errors": {    "amount": [      "[required]: Is a required non-nullable field",      "[int]: Must be an integer",      "[min:0]: Must be greater than 0",      "[max:999999999]: Must be less than 999999999"    ]  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}

Initialize Payment Session

Initializes a new payment session with the ePay Payments API. This endpoint requires a valid ApiKey and must be called from the server side to ensure the ApiKey is never exposed client-side. You’ll receive the outcome of the payment session on the notificationUrl you provide within the request, making it the primary way to track the result of this payment. Webhooks can be used separately if you need broader, system-wide updates. We recommend a minimum timeout of 5 seconds. Required or configurable fields In the ePay backoffice, under Advanced Point of Sale Settings, you can set default values for many session initialization parameters. This allows you to manage your setup without updating your code. Each property must be defined either in the backoffice or in the API request. If a value is provided in the API request, it overrides the backoffice default. The following fields can be configured: - scaMode - timeout - instantCapture - processor - maxAttempts - notificationUrl - successUrl - failureUrl - exemptions Note: Only a subset of these fields are strictly required for the API request. The table below indicates which fields are mandatory or optional.

Create Payment Link

Creates a new payment link with the ePay Payments API. This endpoint requires a valid ApiKey and must be called from the server side to ensure the ApiKey is never exposed client-side. We recommend a minimum timeout of 5 seconds. Required fields In the ePay backoffice in the advanced Point of Sale settings you can set the default for many of the session initialization parameters, allowing you to change your setup from the interface without updating your code. Properties must be defined in either the point of sale settings or the API request. The API request takes precedence and overwrites any point of sale settings if present. These fields are: - scaMode - timeout - instantCapture - processor - maxAttempts - notificationUrl - successUrl - failureUrl