### GET /public/api/v1/subscriptions/billing/agreements Source: https://docs.epay.eu/specs/payments.yaml Returns a paginated list of all billing agreements associated to your account. ```markdown ### Responses #### 200 - Billing agreement details. **BillingAgreementsListResponse** - **page** (integer): The current pagination page - **perPage** (integer): The requested number of entries per page - **lastPage** (integer): The last page with entries - **total** (integer): The total number of entries - **firstPageUrl** (string): URL for the first page - **lastPageUrl** (string): URL for the last page - **nextPageUrl** (string): URL for the next page - **previousPageUrl** (string): URL for the previous page - **nextPage** (integer): The page number for the next page. Null if no next page. - **previousPage** (integer): The page number for the previous page. Null if no previous page. - **from** (integer): The entry offset for the first entry in the page - **to** (integer): The entry offset for the last entry in the page - **path** (string): The path for the pagination endpoint - **items** (array (BillingAgreementResource)): The page contents Array items: - **billingAgreement** (object): Represents an automated, recurring payment agreement between a merchant and a cardholder. Links a Subscription to a Billing Plan so ePay can manage scheduled charges and track billing status. - **id** (string (uuid)) (required): Unique identifier for the billing agreement. (example: "019a729e-2d93-7612-9329-8f783f66f834") - **billingPlanId** (string (uuid)) (required): ID of the associated billing plan. (example: "019a729e-41c2-7d16-a1e2-fdb15a8146bb") - **subscriptionId** (string (uuid)) (required): ID of the linked subscription. (example: "019a729e-51ed-7426-b7c9-0e212b2d77d4") - **sessionId** (string (uuid)): Optional session identifier. Is only present when the billing agreement was made using a session. (example: "019a729e-660a-7a05-90ad-5160ad0decc5") - **customerId** (string): Optional customer identifier. (example: "user-1") - **nextChargeAt** (string (date-time)): Date and time of the next charge, if scheduled. Will be null if the agreement is not in the `ACTIVE` state. (example: "2030-08-29T15:51:28.071Z") - **lastChargeAt** (string (date-time)): Date and time of the last charge, if available. (example: "2030-07-29T15:51:28.071Z") - **desiredDate** (integer): Preferred day of the month for charging. This is the day of the month ePay will attempt to target for monthly payments. This ensures a consistent billing date across months, which might otherwise vary depending on number of days in the month or leap years. Only available for monthly intervals. (example: 30) - **state** (string (PENDING|ACTIVE|STOPPED)) (required): Current state of the billing agreement. ("PENDING"|"ACTIVE"|"STOPPED") - **stateChangedAt** (string (date-time)) (required): Timestamp when the billing agreement last changed state. (example: "2030-07-29T15:51:28.071Z") - **reference** (string): Optional reference string. (example: "agreement-1") - **createdAt** (string (date-time)) (required): Timestamp when the billing agreement was created. (example: "2030-07-29T15:51:28.071Z") #### 400 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") #### 422 - response - **errorCode** (string) (required): Machine-readable error code indicating the type of error. (example: "VALIDATION_ERROR") - **message** (string) (required): Human-readable description of the error. (example: "Input validation errors") - **errors** (object): Object where each key corresponds to the name of an invalid field. Each value is an array of strings, where each string describes a specific validation issue for that field. (example: {"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"]}) #### 500 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") ### Example Usage ```bash curl -X GET "https://payments.epay.eu/public/api/v1/subscriptions/billing/agreements" ``` ``` -------------------------------- ### GET /public/api/v1/transactions/operations Source: https://docs.epay.eu/specs/payments.yaml Retrieve a paginated list of transaction operations. Query parameters `page` and `perPage` can be used to control pagination. `finalizedBefore` and `finalizedAfter` can be sent to only get operations finalized between certain timeframes. `pointOfSaleId` can be used to limit the operations to a list of points of sale.

The endpoint only returns operations in a finalized state of `FAILED` or `SUCCESS`. ```markdown ### Parameters - **page** (integer, query, optional): Page number. - **perPage** (integer, query, optional): Number of items per page. - **finalizedBefore** (string (date-time), query, optional): A filter to limit operations created finalized before a certain time. RFC 3339 format. - **finalizedAfter** (string (date-time), query, optional): A filter to limit operations created finalized after a certain time. RFC 3339 format. - **pointOfSaleId** (array (string (uuid)), query, optional): An optional filter to limit operations from the given points of sale. ### Responses #### 200 - A paginated list of transaction operations. **TransactionOperationListResponse** - **page** (integer): The current pagination page - **perPage** (integer): The requested number of entries per page - **lastPage** (integer): The last page with entries - **total** (integer): The total number of entries - **firstPageUrl** (string): URL for the first page - **lastPageUrl** (string): URL for the last page - **nextPageUrl** (string): URL for the next page - **previousPageUrl** (string): URL for the previous page - **nextPage** (integer): The page number for the next page. Null if no next page. - **previousPage** (integer): The page number for the previous page. Null if no previous page. - **from** (integer): The entry offset for the first entry in the page - **to** (integer): The entry offset for the last entry in the page - **path** (string): The path for the pagination endpoint - **items** (array (Operation)): The page contents Array items: - **id** (string (uuid)): The ID of the operation - **referenceTransactionOperationId** (string (uuid)): The ID of another operation that this operation depends on. For example, a `REFUND` must reference the `CAPTURE` it is refunding. Other operation types may also reference a prior operation if required. - **amount** (integer): The operation amount in minor units (e.g., 1095 = 10.95 DKK) - **state** (string (PROCESSING|SUCCESS|FAILED)): The state of the operation. - `PROCESSING`: The operation has been received and is being handled. - `SUCCESS`: The operation completed successfully. - `FAILED`: The operation could not be completed. See `errorCode` for rejection reason. ("PROCESSING"|"SUCCESS"|"FAILED") - **transactionId** (string): The ID of the associated transaction (example: "LDG7M4WW44G") - **type** (string (AUTHORIZATION|SALE|CAPTURE|REFUND|VOID|PAYOUT)): The type of operation. - `AUTHORIZATION`: Reserve funds on the payment method. - `CAPTURE`: Transfer previously authorized funds. - `SALE`: A combined operation that performs both `AUTHORIZATION` and `CAPTURE` in a single step. - `REFUND`: Return funds to the customer. - `VOID`: Releases previously authorized funds. - `PAYOUT`: Transfer funds to a recipient. `SALE` operations are only available for certain acquirers and will be used when available and instant capture is enabled. ("AUTHORIZATION"|"SALE"|"CAPTURE"|"REFUND"|"VOID"|"PAYOUT") - **errorCode** (string): When state is equal to `FAILED`, this will contain the explaining error code. - **createdAt** (string (date-time)): The time of creation - **finalizedAt** (string (date-time)): The timestamp when the operation reached a terminal state. An operation is terminal once it transitions from `PROCESSING` to either `SUCCESS` or `FAILED`. #### 400 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") #### 422 - response - **errorCode** (string) (required): Machine-readable error code indicating the type of error. (example: "VALIDATION_ERROR") - **message** (string) (required): Human-readable description of the error. (example: "Input validation errors") - **errors** (object): Object where each key corresponds to the name of an invalid field. Each value is an array of strings, where each string describes a specific validation issue for that field. (example: {"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"]}) #### 500 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") ### Example Usage ```bash curl -X GET "https://payments.epay.eu/public/api/v1/transactions/operations?page=1&perPage=25&finalizedBefore=2023-01-01T00:00:00Z&finalizedAfter=2023-01-01T00:00:00Z&pointOfSaleId=item1,item2" ``` ``` -------------------------------- ### POST /public/api/v1/mit Source: https://docs.epay.eu/specs/payments.yaml A MIT (Merchant-Initiated Transaction) is a payment initiated by the merchant, typically based on a previously established agreement, such as a subscription.

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.

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. ```markdown ### Parameters - **Idempotency-Key** (string, header, optional): Ensures that a request can be safely retried without causing duplicate operations. Typically used for actions like payment creation and operations such as refund and void to prevent accidental double processing. - If a response is replayed due to using the same key, the response will include the header `Idempotent-Replayed: true`. - Idempotency keys are scoped by **[Key, Endpoint, HTTP Verb]**; the same key on a different endpoint or method will not replay the original response. - Responses are cached for **24 hours**. After that, the cache is cleared, so idempotency is only guaranteed within 24 hours of the initial request. ### Request Body **Content-Type:** application/json - **subscriptionId** (string (uuid)) (required): The ID of the subscription to charge - **amount** (integer) (required): Amount in minor units (e.g., 1095 = 10.95 DKK) - **currency** (string): The currency of the transaction. If set to null, then the same currency as the subscription was created for will be used. - **reference** (string): The merchant reference for the payment. This is typically used for the order id. - **instantCapture** (string (OFF|VOID|NO_VOID)): If the payment should be captured instantly or not. ("OFF"|"VOID"|"NO_VOID") - **textOnStatement** (string): The text to show on the cardholder bank statement. Many providers do not support long texts. Epay will cut the text to match the acquirer limitations. - **notificationUrl** (string (uri)) (required): The URL to receive the webhook with the transaction result - **attributes** (object): A list of pass-through parameters that will be sent back on the notification URL ### Responses #### 200 - MIT authorization requested successfully created. Processing will begin shortly. **TransactionResponse** - **transaction** (object) - **id** (string): The ID of the transaction (example: "LDG7M4WW44G") - **subscriptionId** (string (uuid)): The ID of the associated subscription (example: "0197c07b-3f6d-7be2-b848-702b08958128") - **billingAgreementChargeId** (string (uuid)): The ID of any associated subscription billing charge. Will be null if the transaction was not an automatic charge made on a billing agreement. (example: "019a727b-987f-7768-a59e-71af920ef81f") - **state** (string (PENDING|PROCESSING|SUCCESS|FAILED)): The current state of the transaction. See our Core Concepts page. ("PENDING"|"PROCESSING"|"SUCCESS"|"FAILED") - **errorCode** (string): If the transaction has failed, this contains the associated error code explaining what went wrong. - **externalStatusCodes** (object): A nullable object containing any known external status codes, such as the status code from the acquirer or the network. This can be useful for merchants who want to be able to react to very specific rejection reasons. - **acquirer** (string): The status code from the acquirer. The possible values depend on processing acquirer. The key is only present if the value is known to ePay. - **network** (string): The status code from the scheme network. The field is only used for card based payments but stays consistent between acquirers. The key is only present if the value is known to ePay. - **sca** (string): A unified status code representing the result of the Strong Customer Authentication (SCA) flow, such as 3DS. The code is built by concatenating the challenge status (`transStatus`) and reason code (`transStatusReason`) from the two steps of the 3DS protocol. | Code | Meaning | |------|--------------------------------------------------| | C | Transaction was challenged | | N | Transaction was rejected | | Y | Transaction was approved | | U | Technical issues | | I | Informational Only (No authentication performed) | The reason code (`transStatusReason`) is appended if present, e.g., `07`. Examples: - `Y` - Frictionless approval - `CY` - Challenged then approved - `CN07` - Challenged then rejected due to reason `07` - `N07` - Rejected without a challenge due to reason `07` - **createdAt** (string (date-time)): The time of creation - **sessionId** (string): The ID of the associated session. This will be null for any MIT transactions. - **paymentMethodId** (string (uuid)): The ID of the associated payment method - **paymentMethodType** (string (CARD|VIPPS_MOBILEPAY|MOBILEPAY_ONLINE|APPLE_PAY|GOOGLE_PAY|SWISH|VIABILL|ANYDAY)): The type of the payment method. (example: "CARD") ("CARD"|"VIPPS_MOBILEPAY"|"MOBILEPAY_ONLINE"|"APPLE_PAY"|"GOOGLE_PAY"|"SWISH"|"VIABILL"|"ANYDAY") - **paymentMethodSubType** (string): The sub type of the associated payment method. For card based payments, this will contain the name of the scheme, such as `Visa` or `Mastercard`. The card scheme name formatted with a uppercase starting character. For non-card based payments the field vary depending on the requirements of the payment method. - **paymentMethodExpiry** (string (date)): The expiration date of the associated payment method. Although payment cards are specified by a month and year (MM/YY), this value is returned as a full date (YYYY-MM-DD) representing the **last day of the expiration month**. Example: `"2030-05-31"` for a card expiring in May 2030. - **paymentMethodDisplayText** (string): A cardholder friendly text to help them identify the payment method. For cards this will be a masked version of the card number. - **paymentMethodHolderName** (string): Contains the entered cardholder name of the optional "name" field. Will be null if the field is not rendered. - **scaMode** (string (SKIP|NORMAL|FORCE)): The SCA mode of the transaction. ("SKIP"|"NORMAL"|"FORCE") - **customerId** (string): The merchant customer id of the transaction. This field is required to enable advanced features such as storing a card for later reuse. Do not use any "guest" customer ids. Customer ids must be unique for each customer and must be protected by authentication. - **amount** (integer): The transaction amount in minor units (e.g., 1095 = 10.95 DKK) - **fee** (integer): The applied transaction fee in minor units. The fee is included in the `amount` field. To get the original amount you must subtract `fee` from `amount`. Fees are only applied if surcharge is configured in the ePay backoffice.

Fees are calculated during transaction processing and as such is always 0 when initially created during MIT transactions. - **currency** (string): The currency of the transaction in ISO 4217 alpha-3. DKK for danish kroner. - **instantCapture** (string (OFF|VOID|NO_VOID)): The instant capture mode. ("OFF"|"VOID"|"NO_VOID") - **notificationUrl** (string (uri)): The URL to receive webhook notifications of any transaction attempts. May contain templating variables. - **pointOfSaleId** (string (uuid)): The ID of the associated point of sale - **reference** (string): The merchant reference of the transaction, this is often used for the order id. - **textOnStatement** (string): The text to show on the cardholder bank statement - **exemptions** (array (string)): The list of exemptions to apply when possible. Note that exemptions may shift liability from the issuer to the merchant. (example: ["LVT","TRA"]) - **attributes** (object): A list of pass-through parameters that will be sent back to the merchant for following any webhooks - **clientIp** (string): The ip (ipv4/ipv6) of the cardholder making the transaction. The IP is captured by ePay at the initialization of the transaction client-side. Can be empty. (example: "52.212.176.122") - **clientCountry** (string): The detected origin country (Alpha-2) based on the `clientIp` property. Can be empty. - Data derived from GeoLite2 by [MaxMind](https://www.maxmind.com). (example: "DK") - **type** (string (PAYMENT|PAYOUT|MOTO)): The type of transaction. ("PAYMENT"|"PAYOUT"|"MOTO") #### 400 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") #### 422 - response - **errorCode** (string) (required): Machine-readable error code indicating the type of error. (example: "VALIDATION_ERROR") - **message** (string) (required): Human-readable description of the error. (example: "Input validation errors") - **errors** (object): Object where each key corresponds to the name of an invalid field. Each value is an array of strings, where each string describes a specific validation issue for that field. (example: {"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"]}) #### 500 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") ### Example Usage ```bash curl -X POST "https://payments.epay.eu/public/api/v1/mit" \ -H "Content-Type: application/json" \ -d '{ "subscriptionId": "string", "amount": "0", "currency": "string", "reference": "string", "instantCapture": "OFF", "textOnStatement": "string", "notificationUrl": "string", "attributes": "value" }' ``` ``` -------------------------------- ### GET /public/api/v1/partner/accounts Source: https://docs.epay.eu/specs/payments.yaml API endpoint for GET /public/api/v1/partner/accounts ```markdown ### Parameters - **page** (integer, query, optional): Page number. - **perPage** (integer, query, optional): Number of items per page. ### Responses #### 200 - This endpoint can be used to fetch all merchant accounts associated with your partner profile. **AccountsListResponse** - **page** (integer): The current pagination page - **perPage** (integer): The requested number of entries per page - **lastPage** (integer): The last page with entries - **total** (integer): The total number of entries - **firstPageUrl** (string): URL for the first page - **lastPageUrl** (string): URL for the last page - **nextPageUrl** (string): URL for the next page - **previousPageUrl** (string): URL for the previous page - **nextPage** (integer): The page number for the next page. Null if no next page. - **previousPage** (integer): The page number for the previous page. Null if no previous page. - **from** (integer): The entry offset for the first entry in the page - **to** (integer): The entry offset for the last entry in the page - **path** (string): The path for the pagination endpoint - **items** (array (object)): The page contents Array items: - **account** (object) - **id** (string (uuid)): The primary id of the merchant account (example: "019a0abe-f093-72c7-9f89-be4e48b9e01e") - **name** (string): The name of the account - **addressLineOne** (string): The address line of the merchant - **addressLineTwo** (string): The address line of the merchant - **city** (string): The city of the merchant - **postalCode** (string): The postal code of the merchant - **countryCode** (string): The country code of the merchant - **phone** (string): The primary contact number of the merchant - **email** (string): The primary contact email of the merchant - **timezone** (string): The primary timezone of the merchant - **invoiceEmail** (string): The email used when sending invoices. - **invoiceAttention** (string): The receiver name of the invoice email. - **vat** (string): The VAT number of the merchant - **currencyCode** (string): The primary currency code of the merchant - **status** (string): The current status of the merchant account - **createdAt** (string (date-time)): The merchant account creation time #### 400 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") #### 500 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") ### Example Usage ```bash curl -X GET "https://payments.epay.eu/public/api/v1/partner/accounts?page=1&perPage=25" ``` ``` -------------------------------- ### GET /public/api/v1/settlements/transfers Source: https://docs.epay.eu/specs/payments.yaml API endpoint for GET /public/api/v1/settlements/transfers ```markdown ### Parameters - **perPage** (integer, query, optional): Maximum number of results to return in the response. - **offset** (string, query, optional): Cursor returned by `nextOffset`. Omit or pass an empty string to fetch the first page. (example: "019b3168-9334-770c-b34f-829d3c9c65d1") ### Responses #### 200 - Cursor-paginated settlement transfers **SettlementTransferCursor** - **currentOffset** (string): Cursor used to generate the current page. Empty when the first page is requested. (example: "") - **nextOffset** (string): Cursor to pass as `offset` when requesting the next page. Null when no more items exist. (example: "019b3168-9334-770c-b34f-829d3c9c65d1") - **perPage** (integer): The maximum number of entries returned in each page. (example: 25) - **hasMore** (boolean): Indicates whether another page can be requested. (example: false) - **items** (array (object)) Array items: - **settlementTransfer** (object) - **id** (string (uuid)): The ePay ID of the settlement transfer (example: "019b3130-5d58-716d-8881-9a3ec506017f") - **acquirer** (string): Acquirer identifier (example: "shift4") - **settlementName** (string): Name or filename of the settlement report as received by ePay. This is mainly used for logging and debugging purposes. (example: "settlement.csv") - **settlementIds** (array (string)): List of MIDs included in the settlement report. - **postingDate** (string (date)): The posting date of the transfer as registered by the acquirer (example: "2025-01-01") - **netAmount** (string): Net amount (After adjustments and fees) as numeric string (example: "99.01") - **currency** (string): ISO 4217 currency (example: "DKK") - **acquirerReference** (string): Reference from acquirer (example: "acq-123") - **adjustments** (array (SettlementAdjustment)) Array items: - **type** (string (RESERVE|ADJUSTMENT|FEE|ACQUIRER_FEE|INTERCHANGE_FEE|SCHEME_FEE)): The type of adjustment, this tells you reason for the adjust and who the money is paid to. The types [`RESERVE`, `ADJUSTMENT`, `FEE`] is used for transfer adjustments. The types [`ACQUIRER_FEE`, `INTERCHANGE_FEE`, `SCHEME_FEE`] is used for transaction adjustments. (example: "FEE") ("RESERVE"|"ADJUSTMENT"|"FEE"|"ACQUIRER_FEE"|"INTERCHANGE_FEE"|"SCHEME_FEE") - **amount** (string): Numeric string, negative for fees (example: "-1.00") - **description** (string): Human-readable description (example: "discount_rate") - **createdAt** (string (date-time)) (example: "2025-12-18T11:20:11Z") #### 401 - Missing/invalid API key Missing/invalid API key #### 500 - Server error Server error ### Example Usage ```bash curl -X GET "https://payments.epay.eu/public/api/v1/settlements/transfers?perPage=25&offset=019b3168-9334-770c-b34f-829d3c9c65d1" ``` ``` -------------------------------- ### PATCH /public/api/v1/partner/accounts/{accountId}/activate Source: https://docs.epay.eu/specs/payments.yaml To enable a merchant to go live, and begin billing, use this endpoint. To receive real production payments, a merchant account must be marked as live. ```markdown ### Parameters - **accountId** (string (uuid), path, required) ### Responses #### 200 - Account activated successfully #### 400 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") #### 500 - response - **errorCode** (string): A system error code to identify the issue. Can be used by your system to detect what went wrong. (example: "SERVER_ERROR") - **message** (string): Contains a human readable explanation of the error code. Any situational detail is appended to the end of the description. (example: "An unexpected system error") ### Example Usage ```bash curl -X PATCH "https://payments.epay.eu/public/api/v1/partner/accounts/{accountId}/activate" ``` ```