Create transfer configuration | Moov Documentation
Create transfer configuration
Create a transfer config for an account.
POST
/accounts/{accountID}/transfer-config
Example Requests
Curl
curl -X POST "https://api.moov.io/accounts/{accountID}/transfer-config" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.04.00" \
-d '{
"tipPresets": {
"calculationBasis": "pre-tax",
"percentageOptions": [\
5,\
15,\
25\
]
}
}'
Go
mc, _ := moov.NewClient()
var accountID string
create := moov.UpsertTransferConfig{
TipPresets: &moov.UpsertTipPresets{
CalculationBasis: moov.PtrOf(moov.TipCalculationBasis_PreTax),
PercentageOptions: []int{5, 15, 25},
},
}
mc.CreateTransferConfig(ctx, accountID, create)
TypeScript
import { Moov } from "@moovio/sdk";
const moov = new Moov({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.transferConfig.create({
accountID: "<id>",
createTransferConfig: {
tipPresets: {
fixedAmountOptions: [\
{\
currency: "USD",\
valueDecimal: "12.987654321",\
},\
],
},
},
});
console.log(result);
}
run();
PHP
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();
$createTransferConfig = new Components\CreateTransferConfig(
tipPresets: new Components\CreateTipPresets(
fixedAmountOptions: [\
new Components\AmountDecimal(\
currency: 'USD',\
valueDecimal: '12.987654321',\
),\
],
),
);
$response = $sdk->transferConfig->create(
accountID: '<id>',
createTransferConfig: $createTransferConfig
);
if ($response->transferConfig !== null) {
// handle response
}
Java
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.TransferConfigValidationError;
import io.moov.sdk.models.operations.CreateTransferConfigResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws GenericError, TransferConfigValidationError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
CreateTransferConfigResponse res = sdk.transferConfig().create()
.accountID("<id>")
.createTransferConfig(CreateTransferConfig.builder()
.tipPresets(CreateTipPresets.builder()
.fixedAmountOptions(List.of(
AmountDecimal.builder()
.currency("USD")
.valueDecimal("12.987654321")
.build()))
.build())
.build())
.call();
if (res.transferConfig().isPresent()) {
System.out.println(res.transferConfig().get());
}
}
}
Python
from moovio_sdk import Moov
from moovio_sdk.models import components
with Moov(
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.transfer_config.create(account_id="<id>", tip_presets={
"fixed_amount_options": [\
{\
"currency": "USD",\
"value_decimal": "12.987654321",\
},\
],
})
# Handle response
print(res)
Ruby
require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
security: Models::Components::Security.new(
username: '',
password: ''
)
)
res = s.transfer_config.create(account_id: '<id>', create_transfer_config: Models::Components::CreateTransferConfig.new(
tip_presets: Models::Components::CreateTipPresets.new(
fixed_amount_options: [\
Models::Components::AmountDecimal.new(\
currency: 'USD',\
value_decimal: '12.987654321'\
),\
]
)
))
unless res.transfer_config.nil?
# handle response
end
C#
using Moov.Sdk;
using Moov.Sdk.Models.Components;
using System.Collections.Generic;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.TransferConfig.CreateAsync(
accountID: "<id>",
body: new CreateTransferConfig() {
TipPresets = new CreateTipPresets() {
FixedAmountOptions = new List<AmountDecimal>() {
new AmountDecimal() {
Currency = "USD",
ValueDecimal = "12.987654321",
},
},
},
}
);
// handle response
Response Examples
Fixed Amount Tip Config Created
{
"tipPresets": {
"fixedAmountOptions": [\
{\
"currency": "USD",\
"valueDecimal": "1.00"\
},\
{\
"currency": "USD",\
"valueDecimal": "2.00"\
},\
{\
"currency": "USD",\
"valueDecimal": "5.00"\
}\
]
}
}
Percentage Tip Config Created
{
"tipPresets": {
"calculationBasis": "pre-tax",
"percentageOptions": [\
10,\
15,\
20\
]
},
"transferControls": [\
{\
"accountID": "01234567-89ab-cdef-0123-456789abcdef",
"allowDynamicDescriptor": true,
"allowSurcharge": true,
"debtRepayment": false,
"partnerAccountID": "01234567-89ab-cdef-0123-456789abcdef"\
}\
]
}
Error Responses
Bad Request Response
{
"error": "string"
}
Authorization Response
The request contained missing or expired authentication.
Guidelines
- A unique identifier is used to trace requests.
- The server could not understand the request due to invalid syntax.
- Request was refused due to rate limiting.