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

Initialize Payment Session

POST
/public/api/v1/cit

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

Idempotency-Keystring

Request Body

application/json

Payment session initialization payload.

TypeScript Definitions

Use the request body type in TypeScript.

pointOfSaleIdstring
Required
Format:
uuid
Example:
"01924737-9c18-71c0-ab1a-88698eaceabf"
Match:
^[A-Za-z0-9-]{1,36}$
Length:
1 <= length <= 36
Example:
"reference-1"
stringstring
Match:
^[A-Za-z0-9-]{1,36}$
Length:
1 <= length <= 36
Example:
"reference-1"
nullnull
Match:
^[A-Za-z0-9-]{1,36}$
Length:
1 <= length <= 36
Example:
"reference-1"
amountinteger
Required
Example:
100
currencystring
Required
Match:
^[A-Z]{3}$
Example:
"DKK"
Possible values:
"OFF""VOID""NO_VOID"
Example:
"OFF"
stringstring
Possible values:
"OFF""VOID""NO_VOID"
Example:
"OFF"
nullnull
Possible values:
"OFF""VOID""NO_VOID"
Example:
"OFF"
Example:
[ "shift4" ]
Example:
[ "shift4" ]
nullnullDeprecated
Example:
[ "shift4" ]
Length:
1 <= length <= 39
Example:
"order 123"
stringstring
Length:
1 <= length <= 39
Example:
"order 123"
nullnull
Length:
1 <= length <= 39
Example:
"order 123"
[key: string]unknown
nullnull
Example:
"User159"
stringstring
Example:
"User159"
nullnull
Example:
"User159"
Example:
{ "firstName": "Peter", "lastName": "Nielsen", "email": "email@example.com" }
Example:
{ "firstName": "Peter", "lastName": "Nielsen", "email": "email@example.com" }
nullnever
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/preAuth"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/preAuth"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/preAuth"
Items:
items <= 1000
Items:
items <= 1000
nullnull
Items:
items <= 1000
idstring
Format:
uuid
amountinteger
typestring
Required
Possible values:
"UNSCHEDULED""SCHEDULED"
Example:
"SCHEDULED"
referencestring
Example:
"subscription-1"
expiryDatestring
Format:
date
periodstring
Required

The period unit between charges

Possible values:
"DAY""WEEK""MONTH""YEAR"
frequencyinteger
Required
Default:
"PAYMENT"
Possible values:
"PAYMENT""MOTO"
stringstring
Default:
"PAYMENT"
Possible values:
"PAYMENT""MOTO"
nullnull
Default:
"PAYMENT"
Possible values:
"PAYMENT""MOTO"
Possible values:
"SKIP""NORMAL""FORCE"
Example:
"NORMAL"
stringstring
Possible values:
"SKIP""NORMAL""FORCE"
Example:
"NORMAL"
nullnull
Possible values:
"SKIP""NORMAL""FORCE"
Example:
"NORMAL"
Range:
1 <= value <= 120
Example:
120
integerinteger
Range:
1 <= value <= 120
Example:
120
nullnull
Range:
1 <= value <= 120
Example:
120
Example:
[]
Example:
[]
nullnull
Example:
[]
Example:
[ "CARD", "VIPPS_MOBILEPAY" ]
Example:
[ "CARD", "VIPPS_MOBILEPAY" ]
nullnull
Example:
[ "CARD", "VIPPS_MOBILEPAY" ]

The maximum allowed number of payment attempts for the session.

Range:
1 <= value <= 25
Example:
25
integerinteger

The maximum allowed number of payment attempts for the session.

Range:
1 <= value <= 25
Example:
25
nullnull

The maximum allowed number of payment attempts for the session.

Range:
1 <= value <= 25
Example:
25
Default:
false
Example:
false
booleanboolean
Default:
false
Example:
false
nullnull
Default:
false
Example:
false
Example:
false
booleanboolean
Example:
false
nullnull
Example:
false
reportExpiredboolean
Default:
false
Example:
false
booleanboolean
Example:
false
nullnull
Example:
false
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/notification"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/notification"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/notification"
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/success"
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/failure"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/failure"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/failure"
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/retry"
stringstring
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/retry"
nullnull
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/retry"
minimumAgeinteger
Required
Range:
0 <= value <= 99
countrystring
Possible values:
"DK"
nullnull

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/cit" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678" \  -H "Content-Type: application/json" \  -d '{    "pointOfSaleId": "01924737-9c18-71c0-ab1a-88698eaceabf",    "amount": 100,    "currency": "DKK"  }'
{  "qrCode": "string",  "paymentWindowUrl": "http://example.com",  "javascript": "http://example.com",  "key": "string",  "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"  }}
{  "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"}