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

MOTO Authorization

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
Format:
uuid
Example:
"01924737-9c18-71c0-ab1a-88698eaceabf"
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"
Example:
[ "shift4" ]
Length:
1 <= length <= 39
Example:
"order 123"
Example:
"User159"
Example:
{ "firstName": "Peter", "lastName": "Nielsen", "email": "email@example.com" }
Format:
uri
Length:
1 <= length <= 1024
Example:
"https://example.com/preAuth"
Items:
items <= 1000

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. 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. 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. 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.