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

Create Point of Sale

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/management/point-of-sales

Create a new Point of Sale and its associated hosted configuration. Note: The webhookAuthentication value is the entire Authorization header value send for any webhook. So you must include the auth scheme such as Bearer or Basic.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Example:
{ "name": "Store #42", "domain": "example.com", "webhookAuthentication": "Bearer super-secret-token" }
namestring
Required

The name to display in the ePay backoffice. If you are creating a point of sale as a partner it is recommended to name the point of sale after yourself. As an example if your company name is "Wordpress IT Solutions" then use the same name for the point of sale. This helps both the merchant and the ePay staff when providing support.

Length:
1 <= length <= 255
domainstring
Required

Must be a valid URL or domain. Use the top level domain and not a sub-domain, even if the payment occurs on a subdomain. If you are providing an iframe payment solution, then you must provide the domain of the iframe and not the browser visiting domain. If you need more than one domain whitelisted, then contact ePay support.

Length:
length <= 1024
webhookAuthenticationstring
Required

The full Authorization header value sent for any notifications / webhooks. Remember to include the Authorization scheme such as Bearer or Basic. The authorization cannot later be updated using the API, it can only be changed and fetched from the ePay backoffice. Example: Bearer super-secret-token.

If you are a partner DO NOT use the same authentication for multiple merchants as this poses a security risk.

Length:
1 <= length <= 255

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/management/point-of-sales" \  -H "Content-Type: application/json" \  -d '{    "name": "Store #42",    "domain": "example.com",    "webhookAuthentication": "Bearer super-secret-token"  }'
{  "pointOfSale": {    "id": "0192473a-e381-705c-b61c-fc2ac9624afc",    "name": "Store #42",    "descriptor": "POS Copenhagen",    "createdAt": "2024-10-01T10:38:14.658688472+02:00",    "updatedAt": "2024-10-01T12:38:14.658688472+02:00"  },  "hostedConfiguration": {    "instantCapture": "OFF",    "scaMode": "SKIP",    "timeout": 60,    "notificationUrl": "https://example.com/notification",    "successUrl": "https://example.com/success",    "failureUrl": "https://example.com/failure",    "retryUrl": null,    "maxAttempts": 10,    "processor": [      "shift4",      "nets"    ],    "exemptions": [      "TRA",      "LVT"    ],    "reportFailure": false  }}
{  "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"}