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

Create Billing Plan

OpenAPI Spec

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/subscriptions/billing/plans

Creates a new billing plan. Billing plans are the basis of all billing agreements with automatic charges.

Relationship to other components

  • Subscription: The underlying link between a merchant and a stored payment method. Created via the Initialize Payment Session /cit endpoint by sending the Subscription object.
  • Billing Plan: Defines recurring details like price, interval, and retry policy. Used only when ePay manages the billing schedule automatically.
  • Billing Agreement: Connects a Subscription to a Billing Plan. Tracks scheduled processing and charge lifecycle.
  • Billing Agreement Charge: Represents a scheduled billing event created from an agreement. Each charge can have multiple transaction attempts and a completion deadline.
  • Transaction: The base payment model used for all processing. Charges and transactions are linked to maintain attempt history.

Authorization

BearerAuth
headerAuthorizationBearer <token>

Request Body

Create billing plan data

namestring
Required

Human-readable name of the billing plan.

Length:
1 <= length <= 256
amountinteger
Required

Charge amount (in the smallest currency unit, e.g. cents).

Range:
1 <= value
currencystring
Required

ISO 4217 alpha-3 currency code (e.g., USD, EUR).

Match:
^[A-Z]{3}$
Length:
3 <= length <= 3
instantCapturestring
Nullable

The InstantCapture mode to use for all charges related to the plan.

  • OFF indicates that the payment should not be captured instantly (Default).
  • 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)
Default:
"OFF"
Example:
"OFF"
Value in:
  • "OFF"
  • "VOID"
  • "NO_VOID"
maxAttemptsinteger
Required

Maximum number of billing attempts before giving up.

Range:
1 <= value <= 31

The frequency between automatic charges. A frequency=2 and period=WEEK means one charge every two weeks.

Response Body

application/json

application/json

application/json

application/json

curl -X POST 'https://payments.epay.eu/public/api/v1/subscriptions/billing/plans' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "amount": 1,  "currency": "str",  "maxAttempts": 1,  "interval": {    "period": "MONTH",    "frequency": 1  }}'
{  "billingPlan": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "instantCapture": "OFF",    "name": "string",    "color": "string",    "emoji": "string",    "amount": 0,    "currency": "str",    "maxAttempts": 0,    "interval": {      "period": "MONTH",      "frequency": 1    },    "createdAt": "2019-08-24T14:15:22Z"  }}