Create Billing Agreement
Creates a new <b>Billing Agreement</b> based on an existing <b>Subscription</b> and a <b>Billing Plan</b>. <br/><br/> A billing agreement represents a scheduled payment relationship between the merchant and the cardholder, managed automatically by ePay. It links a subscription and a plan together, allowing ePay to handle recurring charges according to the plan’s configuration - for example, charging the customer monthly based on the defined price and interval. <br/><br/> <b>Important:</b> Billing agreements is an <b>optional</b> extension of the base subscription and is only necessary if you want ePay to automatically manage recurring or interval-based billing on your behalf. <br/><br/> If you only need to perform unscheduled MIT (Merchant-Initiated Transaction) payments - meaning you trigger the charge manually via the API whenever needed - you do not need to create a billing agreement or billing plan. In that case, use the existing Subscription created through the [Initialize Payment Session <code>/cit</code>](/api/initialize-payment-session) endpoint, and perform MIT transactions directly. <br/><br/> :::info Relationship to other components - <b>Subscription:</b> The underlying link between a merchant and a stored payment method. Created via the [Initialize Payment Session <code>/cit</code>](/api/initialize-payment-session) endpoint by sending the Subscription object. - <b>Billing Plan:</b> Defines recurring details like price, interval, and retry policy. Used only when ePay manages the billing schedule automatically. - <b>Billing Agreement:</b> Connects a Subscription to a Billing Plan. Tracks scheduled processing and charge lifecycle. - <b>Billing Agreement Charge:</b> Represents a scheduled billing event created from an agreement. Each charge can have multiple transaction attempts and a completion deadline. - <b>Transaction:</b> The base payment model used for all processing. Charges and transactions are linked to maintain attempt history. :::
Authorization
BearerAuth In: header
Request Body
application/json
Create billing agreement data
TypeScript Definitions
Use the request body type in TypeScript.
Identifier for the associated billing plan.
uuidIdentifier for the related subscription. Subscription must be in `ACTIVE` state.
uuidnullOptional reference string.
"agreement-1"Optional reference string.
"agreement-1"Optional reference string.
"agreement-1"Date of the next scheduled charge. If none is given, the current date and interval from the plan is used to calculate the next charge date.
date"2030-07-29"Date of the next scheduled charge. If none is given, the current date and interval from the plan is used to calculate the next charge date.
date"2030-07-29"Date of the next scheduled charge. If none is given, the current date and interval from the plan is used to calculate the next charge date.
date"2030-07-29"Response Body
application/json
application/json
application/json
application/json