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

Create merchant Account

OpenAPI Spec

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/partner/accounts

Create a merchant account associated with your partner profile and invite its owner by email. Authenticate using your partner key as an Authorization: Bearer header. A missing or malformed key returns 401; a key rejected by authentication returns 403.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Optional address and contact fields may be omitted or null. A non-null VAT number requires a non-null countryCode.

namestring
Required

The name of the merchant, typically the company name or the name of its domain or app.

Length:
1 <= length
Example:
"Merchant Name"
emailstring
Required

The email address invited to join the created merchant account with ownership privileges.

Format:
email
Length:
1 <= length <= 255
Example:
"owner@merchant.dk"
currencyCodestring
Required

The primary currency of the merchant. Must be a valid ISO 4217 alpha-3 currency code.

Length:
3 <= length <= 3
Example:
"DKK"
languagestring
Required

The primary language of the merchant, expressed as a two-character language code.

Length:
2 <= length <= 2
Example:
"da"
timezonestring
Required

The primary timezone of the merchant.

Length:
1 <= length
Example:
"Europe/Copenhagen"
domainstring
Required

The merchant website. Accepts a domain name or a URL.

Example:
"merchant.dk"
addressLineOnestring
Nullable

The first merchant address line.

Length:
1 <= length
Example:
"Merchant Street 1"
addressLineTwostring
Nullable

The second merchant address line.

Length:
1 <= length
Example:
"Floor 2"
citystring
Nullable

The merchant city.

Length:
1 <= length
Example:
"Copenhagen"
postalCodestring
Nullable

The merchant postal code.

Length:
1 <= length <= 32
Example:
"2100"
countryCodestring
Nullable

A valid ISO 3166-1 alpha-2 country code. Required when vat is non-null. If omitted or null without VAT, the country is derived from language, falling back to DK. Use GB for the United Kingdom and GR for Greece.

Length:
2 <= length <= 2
Example:
"DK"
phonestring
Nullable

The primary contact phone number. Must be non-empty when supplied; no specific phone format is enforced.

Length:
1 <= length
Example:
"+45 12345678"
vatstring
Nullable

The merchant VAT number without a country code prefix or separators for the countries listed below.

  • AT: ^U[0-9]{8}$
  • BE: ^[0-9]{10}$
  • BG: ^[0-9]{9,10}$
  • CY: ^[0-9]{8}[A-Z]$
  • CZ: ^[0-9]{8,10}$
  • DE: ^[0-9]{9}$
  • DK: ^[0-9]{8}$
  • EE: ^[0-9]{9}$
  • ES: ^([A-Z][0-9]{7}[A-Z0-9]|[0-9]{8}[A-Z])$
  • FI: ^[0-9]{8}$
  • FR: ^[0-9A-HJ-NP-Z]{2}[0-9]{9}$
  • GB: ^([0-9]{9}([0-9]{3})?|(GD|HA)[0-9]{3})$
  • GR: ^[0-9]{9}$
  • HR: ^[0-9]{11}$
  • HU: ^[0-9]{8}$
  • IE: ^([0-9]{7}[A-Z]{1,2}|[0-9][A-Z+*][0-9]{5}[A-Z])$
  • IT: ^[0-9]{11}$
  • LT: ^[0-9]{9}([0-9]{3})?$
  • LU: ^[0-9]{8}$
  • LV: ^[0-9]{11}$
  • MT: ^[0-9]{8}$
  • NL: ^[0-9]{9}B[0-9]{2}$
  • NO: ^[0-9]{9}(MVA)?$
  • PL: ^[0-9]{10}$
  • PT: ^[0-9]{9}$
  • RO: ^[0-9]{2,10}$
  • SE: ^[0-9]{10}01$
  • SI: ^[0-9]{8}$
  • SK: ^[0-9]{10}$
Length:
1 <= length <= 32
Example:
"12345678"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/partner/accounts" \  -H "Content-Type: application/json" \  -d '{    "name": "Merchant Name",    "email": "owner@merchant.dk",    "currencyCode": "DKK",    "language": "da",    "timezone": "Europe/Copenhagen",    "domain": "merchant.dk"  }'
{  "account": {    "id": "019a0abe-f093-72c7-9f89-be4e48b9e01e",    "name": "string",    "addressLineOne": "string",    "addressLineTwo": "string",    "city": "string",    "postalCode": "string",    "countryCode": "string",    "phone": "string",    "email": "string",    "timezone": "string",    "invoiceEmail": "string",    "invoiceAttention": "string",    "invoiceCompanyName": "string",    "invoiceAddressLineOne": "string",    "invoiceAddressLineTwo": "string",    "invoiceCity": "string",    "invoicePostalCode": "string",    "globalLocationNumber": "string",    "useSeparateInvoicingAddress": true,    "vat": "string",    "currencyCode": "string",    "referenceNumber": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "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"}