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

MOTO Authorization

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/moto

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

Idempotency-Keystring

Request Body

application/json

Transaction processing result

TypeScript Definitions

Use the request body type in TypeScript.

pointOfSaleIdstring
Required

Id of the point of sale to associate the payment with.

Format:
uuid
Example:
"01924737-9c18-71c0-ab1a-88698eaceabf"
referencestring
Nullable
Match:
^[A-Za-z0-9-]{1,36}$
Length:
1 <= length <= 36
Example:
"reference-1"
amountinteger
Required

The amount must be defined in minor units. E.g. 2,50 DKK must be set as 250. If amount is set to 0 a token will be created only and returned to the integrator.

Example:
100
currencystring
Required

The currency code of the payment. For Danish Kroner defined as DKK. ISO 4217 alpha-3 (e.g., DKK)

Match:
^[A-Z]{3}$
Example:
"DKK"
instantCapturestring
Nullable

If the payment should be captured instantly or not.

  • OFF indicates that the payment should not be captured instantly.
  • VOID indicates that the payment should be captured instantly and if somehow the instant capture fails the payment is voided.
  • NO_VOID indicates that the payment should be captured instantly and if the capture fails the authorization is kept (no void is made)
Possible values:
"OFF""VOID""NO_VOID"
Example:
"OFF"
Example:
[ "shift4" ]
textOnStatementstring
Nullable

This is the text set on the transaction in the bank viewed by the card holder. That can be e.g. "order 123". Defaults to the ePay transaction id. Some providers does not support long texts, ePay will automatically cut the text to fit the providers requirements.

Length:
1 <= length <= 39
Example:
"order 123"

A list of pass through attributes that is sent back to the merchant on webhooks. Max size is 1kb.

customerIdstring
Nullable

An optional merchant defined customer id used to uniquely identify a user in the merchant system. This field is required to enable stored payment methods and enhanced age verification.

Example:
"User159"

Customer info. These data points are used during SCA/3DS and is required for some schemes. These data may also be sent to the specific payment provider, if required to complete the payment such as Klarna. It is recommended to send all the info that is available to improve the approval rate.

Example:
{ "firstName": "Peter", "lastName": "Nielsen", "email": "email@example.com" }
preAuthUrlstring
Nullable

If not null then pre-authorization webhook are enabled for all transaction attempts for the session. Max length is 1024.

Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/preAuth"

The array containing list of line items that are part of this order. Maximum of 1000 line items could be processed in a single order. This is used by some payment methods, such as Klarna.

Items:
items <= 1000

Note scaMode is always set to FORCE when initializing a subscription due to EU PSD2 regulations.

To create a subscription, allowing you to process MIT transactions in the future, you must send the subscription object. To process MIT transactions you must ensure your acquirer agreement has recurring payments enabled.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/moto" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678" \  -H "Content-Type: application/json" \  -d '{}'
{  "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"  },  "aggregates": {    "authorized": 25000,    "captured": 15000,    "refunded": 7500,    "voided": 3000,    "remaining": 8000,    "paidOut": 0  },  "operations": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "referenceTransactionOperationId": "09c60a7b-397b-4797-a5c8-792dc558cbed",      "amount": 0,      "state": "PROCESSING",      "transactionId": "LDG7M4WW44G",      "type": "AUTHORIZATION",      "errorCode": "string",      "createdAt": "2019-08-24T14:15:22Z",      "finalizedAt": "2019-08-24T14:15:22Z"    }  ],  "acquirerAgreement": {    "acquirer": "shift4",    "mcc": "4514"  },  "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"  },  "subscription": {    "id": "01929a94-5fce-7ccc-a7e4-7e9249133b39",    "paymentMethodId": "01924756-d1f6-738d-8040-90d76cedf01f",    "currency": "DKK",    "customerId": "User159",    "pointOfSaleId": "0192473a-e381-705c-b61c-fc2ac9624afc",    "reference": "reference-1",    "description": "string",    "state": "ACTIVE",    "type": "SCHEDULED",    "expiryDate": "2050-01-01",    "interval": {      "period": "MONTH",      "frequency": 1    },    "createdAt": "2019-08-24T14:15:22Z"  },  "sca": {    "rejected": false,    "type": "3DS",    "verification": "FRICTIONLESS"  },  "card": {    "pan": "12345678XXXX1234",    "expireMonth": "07",    "expireYear": "35",    "par": "8F1B7C2QX4Z9N3V6M2R0K8YD5LJTPH",    "Issuer": "Danske Bank",    "Scheme": "Visa",    "Country": "DK",    "Segment": "consumer",    "Funding": "debit"  }}
{  "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"}

MIT Batch Authorization

Rate limits Please review our rate limits before you begin your implementation. Create multiple MIT (Merchant-Initiated Transaction) authorizations in a single request. Each entry mirrors the single MIT endpoint and is processed asynchronously, supporting partial success across the batch. Each transaction is processed individually, if the transaction passes initial validation then a transaction is created for background processing and a transaction is returned. If the initial validation fails, instead an error is returned. You will receive one callback for each individual transaction. You’ll receive the outcome of each payment on the notificationUrl you provide within the request, making it the primary way to track the result of these payments. Webhooks can be used separately if you need broader, system-wide updates. Use a MIT authorization when the customer has agreed to let the merchant charge them automatically. For example, monthly subscription payments must be handled using MIT. MIT is not suitable when the customer starts the payment themselves, like clicking a “Pay Now” button. For more information about the differences between CIT (Customer-Initiated Transaction) and MIT, see our Core Concepts page. All MIT transactions are processed asynchronously and cannot run in real time. Most are completed within a few seconds, but ePay does not guarantee processing times. Some payment methods, such as Vipps MobilePay, may take several days to complete, depending on the method’s processing rules. When you match the returned transaction results back to your original batch request, the transaction order is preserved from request to response. This means you can always correlate each result to the original request item by using the array index. You can also provide a reference on each transaction in your request. When present, the same reference value is included in the returned result for that transaction, which gives you an explicit way to link results back to your own records. If you choose to rely on reference for correlation, make sure you send transaction.reference for every transaction in the batch. Otherwise, use the array index as the correlation key. If you want to offer your customers the ability to store their cards for faster checkout in the future, you must use CIT transactions. In such cases, you are required to provide a customerId when creating the payment. This ID links the stored card to the customer and enables quick-checkout functionality in future sessions. We recommend a minimum timeout of 10 seconds.

Physical Sale

Starts an in-person sale on a physical payment terminal connected to a Softpay point of sale. Physical transactions are processed using operation type SALE, which functions as an instant capture making sales function as both an AUTHORIZATION and CAPTURE in a single atomic operation. These transactions therefor cannot be voided. This endpoint creates the transaction immediately. The transaction returned in the response confirms that the sale request was accepted and created, but not that the cardholder has completed the payment yet. If terminal.id is provided, ePay targets that specific terminal. If terminal is omitted, ePay automatically routes the sale to the fallback terminal for the given point of sale. The pointOfSaleId must refer to a physical Softpay point of sale that belongs to your account. ### Refunds Physical transactions does not support card-not-present online refunds. Meaing the refund operation is not supported for physical transactions. To refund a previous purchase a PAYOUT transaction must be initiated instead by setting "type": "PAYOUT", which will initiate a transaction on the terminal sending funds to the card placed on the terminal. ### Notification You’ll receive the outcome of the payment 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. Early rejections, such as the SoftPay terminal being wrongly configured or blocked by another transaction will return a transaction response with state FAILED. If the transaction fails due to early rejections, the final state is returned in the response and no notification is sent to the notificationUrl.