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
Python TypeScript Java PHP
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
from  import Moov
from .models import components


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

    res = moov.fee_plans.create_fee_plan_agreements(account_id="19962eb8-00cd-44e5-8a66-a1ebaf88c2fe", plan_id="b97c2d59-80c5-49ac-b1fc-40e3a81d8daf")

    # Handle response
    print(res)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Moov } from "@moovio/sdk";

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

async function run() {
  const result = await moov.feePlans.createFeePlanAgreements({
    accountID: "19962eb8-00cd-44e5-8a66-a1ebaf88c2fe",
    createFeePlanAgreement: {
      planID: "b97c2d59-80c5-49ac-b1fc-40e3a81d8daf",
    },
  });

  // Handle the result
  console.log(result);
}

run();
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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("19962eb8-00cd-44e5-8a66-a1ebaf88c2fe")
                .createFeePlanAgreement(CreateFeePlanAgreement.builder()
                    .planID("b97c2d59-80c5-49ac-b1fc-40e3a81d8daf")
                    .build())
                .call();

        if (res.feePlanAgreement().isPresent()) {
            // handle response
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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: 'b700714f-83b3-45f6-91b3-1f9081d9e23c',
);

$response = $sdk->feePlans->createAgreements(
    accountID: 'a39319c8-13f2-4af4-9f8c-e0ce6779fd54',
    createFeePlanAgreement: $createFeePlanAgreement,
    xMoovVersion: 'v2024.01.00'

);

if ($response->feePlanAgreement !== null) {
    // handle response
}
201 400 401 403 404 409 422 429 500 504
The resource was successfully created.
{
  "acceptedOn": "2019-08-24T14:15:22Z",
  "accountID": "3dfff852-927d-47e8-822c-2fffc57ff6b9",
  "agreementID": "793309ac-2203-4baa-9b39-9711e4a1b9a8",
  "billableFees": [
    {
      "billableEvent": "card-auth-volume",
      "billableFeeID": "9d957d33-1a9a-47aa-9460-fe1a90f003dd",
      "feeCategory": "card-acquiring",
      "feeConditions": {
        "transactionType": [
          "decline"
        ]
      },
      "feeModel": "fixed",
      "feeName": "Card decline fee",
      "feeProperties": {
        "fixedAmount": {
          "currency": "USD",
          "valueDecimal": "0.1"
        }
      }
    }
  ],
  "cardAcquiringModel": "cost-plus",
  "description": "string",
  "minimumCommitment": {
    "currency": "USD",
    "valueDecimal": "12.987654321"
  },
  "monthlyPlatformFee": {
    "currency": "USD",
    "valueDecimal": "12.987654321"
  },
  "name": "string",
  "planID": "b3e38790-d1c0-4afb-b75c-aa44e99a6877",
  "status": "active"
}

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
  "error": "string"
}

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The request contained missing or expired authentication.

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The user is not authorized to make the request.

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The requested resource was not found.

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
  "error": "string"
}

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
  "planID": "string"
}

x-request-id

string <uuid> required
A unique identifier used to trace requests.
Request was refused due to rate limiting.

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The request failed due to an unexpected error.

x-request-id

string <uuid> required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.

x-request-id

string <uuid> required
A unique identifier used to trace requests.

Headers

x-moov-version

string
API version

Specify an API version.

API versioning follows the format vYYYY.QQ.BB, where

  • YYYY is the year
  • QQ is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
  • BB is the build number, starting at .01, for subsequent builds in the same quarter.
    • For example, v2024.01.00 is the initial release of the first quarter of 2024.

The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.

Default: v2024.01.00

Path parameters

accountID

string <uuid> required

Body

application/json

planID

string<uuid> required

Response

application/json

acceptedOn

string<date-time> required

agreementID

string<uuid> required

billableFees

array required
Show child attributes

billableEvent

string
A unique code identifying a charge.

billableFeeID

string<uuid>

feeCategory

string<enum>
Possible values: ach, card-acquiring, card-other, card-pull, card-push, monthly-platform, network-passthrough, other, rtp

feeConditions

object
Defines the specific conditions that must be met for the fee to be applied.

feeModel

string<enum>
Specifies the pricing model used for the calculation of the final fee.
Possible values: fixed, blended, variable

feeName

string
Specifies the name of the fee that will be billed.

feeProperties

object
Defines the specific parameters used for fee calculation.
Show child attributes

fixedAmount

object
A fixed fee that is applied to the amount of each transaction in the fixed and blended fee models.
Show child attributes

currency

string required Pattern
A 3-letter ISO 4217 currency code.

valueDecimal

string required Pattern

A decimal-formatted numerical string that represents up to 9 decimal place precision.

For example, $12.987654321 is ‘12.987654321’.

maxPerTransaction

object
Specifies the maximum allowable spending for a single transaction, working as a transaction ceiling.
Show child attributes

currency

string required Pattern
A 3-letter ISO 4217 currency code.

valueDecimal

string required Pattern

A decimal-formatted numerical string that represents up to 9 decimal place precision.

For example, $12.987654321 is ‘12.987654321’.

minPerTransaction

object
Specifies the minimum allowable spending for a single transaction, working as a transaction floor.
Show child attributes

currency

string required Pattern
A 3-letter ISO 4217 currency code.

valueDecimal

string required Pattern

A decimal-formatted numerical string that represents up to 9 decimal place precision.

For example, $12.987654321 is ‘12.987654321’.

variableRate

string Pattern

A percentage fee that is applied to the amount of each transaction in the blended fee model, expressed as a decimal.

For example, 0.05% is ‘0.05’.

cardAcquiringModel

string<enum> required
Specifies the card processing pricing model
Possible values: cost-plus, flat-rate

minimumCommitment

object required
The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
Show child attributes

currency

string required Pattern
A 3-letter ISO 4217 currency code.

valueDecimal

string required Pattern

A decimal-formatted numerical string that represents up to 9 decimal place precision.

For example, $12.987654321 is ‘12.987654321’.

monthlyPlatformFee

object required
Fixed recurring amount paid in the billing period regardless of usage.
Show child attributes

currency

string required Pattern
A 3-letter ISO 4217 currency code.

valueDecimal

string required Pattern

A decimal-formatted numerical string that represents up to 9 decimal place precision.

For example, $12.987654321 is ‘12.987654321’.

name

string required
The name of the agreement.

planID

string<uuid> required

status

string<enum> required
Possible values: active, terminated

accountID

string<uuid>

description

string
The description of the agreement.

OSZAR »