curl --request POST \
--url https://api.royalti.io/payment-setting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account",
"user": ""
}
'{
"status": "success",
"message": "Payment setting created successfully",
"paymentSetting": {
"id": "24d2c371-4a7a-4acd-b4aa-d3eb3bebd8fa",
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account",
"createdAt": "2023-11-22T20:48:36.034Z",
"updatedAt": "2023-11-22T20:48:36.034Z"
}
}/payment-setting/
curl --request POST \
--url https://api.royalti.io/payment-setting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account",
"user": ""
}
'{
"status": "success",
"message": "Payment setting created successfully",
"paymentSetting": {
"id": "24d2c371-4a7a-4acd-b4aa-d3eb3bebd8fa",
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account",
"createdAt": "2023-11-22T20:48:36.034Z",
"updatedAt": "2023-11-22T20:48:36.034Z"
}
}/payment-setting/
This endpoint is responsible for creating a new payment setting.
Method:POST
Request Payload:
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the payment setting |
| type | string | Yes | The type of the payment setting |
| settings | object | Yes | The settings/configuration of the payment setting. Some of the sample properties are “accountName”, “accountNumber”, “bankName”, “routingNumber”, “swiftCode”, “IBAN”, indicating details related to the payment method configuration |
| isDefault | boolean | No | Indicates whether the payment setting is the default one |
| memo | string | No | Any additional notes or comments about the payment setting |
| user | string | No | TenantUserId of the user, used when setting up payment settings for other users (admin/owner only) |
{
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account"
}
{
"name": "Primary PayPal Account",
"type": "PayPal",
"settings": {
"paypalEmail": "[email protected]",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main PayPal account"
}
const response = await fetch('https://api.royalti.io/payment-setting', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "sample-name",
"type": "sample-type",
"settings": {},
"isDefault": true,
"user": "sample-user",
"memo": "sample-memo"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
The name of the payment setting
The type of the payment setting
BankWireTransfer, PayPal, Card, Crypto The settings/configuration of the payment setting
Indicates whether the payment setting is the default one
UserId of the user who created the payment setting, used when setting up payments settings for other used
Any additional notes or comments about the payment setting