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.07.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
The resource was successfully created.
Ask
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"
}
}
Response headers
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
Ask
Example
{
"error": "string"
}
Response headers
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
Ask
Example
{
"error": "string"
}
Response headers
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.
Ask
Example
{
"planID": "string"
}
Response headers
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
A unique identifier used to trace requests.
Set this header to v2026.07.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, which may not match the behavior documented here.
Possible values:
v2026.07.00
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
Show child attributes
A unique code identifying a charge.
Possible values:
ach,
card-acquiring,
card-other,
card-pull,
card-push,
instant-bank,
monthly-platform,
network-passthrough,
other,
rtp
Defines the specific conditions that must be met for the fee to be applied.
Specifies the pricing model used for the calculation of the final fee.
Possible values:
fixed,
blended,
variable
Specifies the name of the fee that will be billed.
Defines the specific parameters used for fee calculation.
Show child attributes
Defines the volume ranges for tiered pricing models.
Show child attributes
The flat amount for a whole tier of the fee.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Specifies the lower value of a tier for the fee.
The unit price for a specific tier of the fee.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Specifies the upper value of a tier for the fee.
A fixed fee that is applied to the amount of each transaction in the fixed and blended fee models.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Specifies the maximum allowable spending for a single transaction, working as a transaction ceiling.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Specifies the minimum allowable spending for a single transaction, working as a transaction floor.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
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'.
Specifies the card processing pricing model
Possible values:
cost-plus,
flat-rate
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
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
Fixed recurring amount paid in the billing period regardless of usage.
Show child attributes
A 3-letter ISO 4217 currency code.
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
The name of the agreement.
Possible values:
active,
terminated
The description of the agreement.