Create fee plan agreement | Moov Documentation

Create fee plan agreement

Creates the subscription of a fee plan to a merchant account. Merchants are required to accept the fee plan terms prior to activation.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

POST

/accounts/{accountID}/fee-plan-agreements

Ask

curl -X POST "https://api.moov.io/accounts/{accountID}/fee-plan-agreements" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.04.00" \
  -d '{
  "planID": "string"
}'

Ask

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.feePlans.createFeePlanAgreements({
    accountID: "409c6b4b-e622-40c2-9dc4-fb494e555723",
    createFeePlanAgreement: {
      planID: "19801f96-ea27-4610-b4d1-8c6b46f37928",
    },
  });

console.log(result);
}

run();

Ask

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;

$sdk = MoovPhp\Moov::builder()
    ->setSecurity(
        new Components\Security(
            username: '',
            password: '',
        )
    )
    ->build();

$createFeePlanAgreement = new Components\CreateFeePlanAgreement(
    planID: '19801f96-ea27-4610-b4d1-8c6b46f37928',
);

$response = $sdk->feePlans->createAgreements(
    accountID: '409c6b4b-e622-40c2-9dc4-fb494e555723',
    createFeePlanAgreement: $createFeePlanAgreement
);

if ($response->feePlanAgreement !== null) {
    // handle response
}

Ask

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.CreateFeePlanAgreement;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.FeePlanAgreementError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateFeePlanAgreementsResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws GenericError, FeePlanAgreementError, Exception {

Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

CreateFeePlanAgreementsResponse res = sdk.feePlans().createFeePlanAgreements()
                .accountID("409c6b4b-e622-40c2-9dc4-fb494e555723")
                .createFeePlanAgreement(CreateFeePlanAgreement.builder()
                    .planID("19801f96-ea27-4610-b4d1-8c6b46f37928")
                    .build())
                .call();

if (res.feePlanAgreement().isPresent()) {
            System.out.println(res.feePlanAgreement().get());
        }
    }
}

Ask

from moovio_sdk import Moov
from moovio_sdk.models import components

with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

res = moov.fee_plans.create_fee_plan_agreements(account_id="409c6b4b-e622-40c2-9dc4-fb494e555723", plan_id="19801f96-ea27-4610-b4d1-8c6b46f37928")

# Handle response
    print(res)

Ask

require 'moov_ruby'

Models = ::Moov::Models
s = ::Moov::Client.new(
  security: Models::Components::Security.new(
    username: '',
    password: ''
  )
)
res = s.fee_plans.create_fee_plan_agreements(account_id: '409c6b4b-e622-40c2-9dc4-fb494e555723', create_fee_plan_agreement: Models::Components::CreateFeePlanAgreement.new(
  plan_id: '19801f96-ea27-4610-b4d1-8c6b46f37928'
))

unless res.fee_plan_agreement.nil?
  # handle response
end

Ask

using Moov.Sdk;
using Moov.Sdk.Models.Components;

var sdk = new MoovClient(security: new Security() {
    Username = "",
    Password = "",
});

var res = await sdk.FeePlans.CreateFeePlanAgreementsAsync(
    accountID: "409c6b4b-e622-40c2-9dc4-fb494e555723",
    body: new CreateFeePlanAgreement() {
        PlanID = "19801f96-ea27-4610-b4d1-8c6b46f37928",
    }
);

// handle response

Example

{
  "agreementID": "string",
  "planID": "string",
  "accountID": "string",
  "name": "string",
  "description": "string",
  "acceptedOn": "2019-08-24T14:15:22Z",
  "status": "active",
  "cardAcquiringModel": "cost-plus",
  "billableFees": [
    {
      "billableFeeID": "9d957d33-1a9a-47aa-9460-fe1a90f003dd",
      "billableEvent": "card-auth-volume",
      "feeName": "Card decline fee",
      "feeModel": "fixed",
      "feeCategory": "card-acquiring",
      "feeProperties": {
        "fixedAmount": {
          "currency": "USD",
          "valueDecimal": "0.0195"
        },
        "variableRate": "0.15",
        "minPerTransaction": {
          "currency": "USD",
          "valueDecimal": "0.0195"
        },
        "maxPerTransaction": {
          "currency": "USD",
          "valueDecimal": "0.035"
        },
        "volumeRanges": [
          {
            "fromValue": 1,
            "toValue": 2,
            "flatAmount": {
              "currency": "USD",
              "valueDecimal": "1.23"
            },
            "perUnitAmount": {
              "currency": "USD",
              "valueDecimal": "1.23"
            }
          }
        ]
      },
      "feeConditions": {
        "transactionType": [
          "decline"
        ]
      }
    }
  ],
  "minimumCommitment": {
    "currency": "USD",
    "valueDecimal": "12.987654321"
  },
  "monthlyPlatformFee": {
    "currency": "USD",
    "valueDecimal": "12.987654321"
  }
}

Example

{
  "error": "string"
}

Example

{
  "planID": "string"
}

Example

{
  "error": "string"
}

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.

Response headers

A unique identifier used to trace requests.