POST/
Use this endpoint to create a fee. Add the source details to the body of the request in JSON format.
Request body
| Fields | Description |
|---|---|
| active boolean Optional | Indicates whether the fee is active. Allowable Values: true, falseDefault value: true |
| amount decimal Required | Amount of the fee. Allowable Values: decimal Format: 0.00 |
| category string Optional | Specifies if the fee is a standalone fee or a real-time fee. Allowable Values: STANDALONE, REALTIME |
| currency_code string Required | Three-digit ISO 4217 currency code. Allowable Values: Valid three-digit ISO 4217 currency code. |
| fee_attributes object Optional | Describes the attributes of a fee. Allowable Values: reason, region, status, transaction_type |
| fee_attributes.reason string Optional | Describes the reason for the fee. Allowable Values: 255 char max |
| fee_attributes.region string Optional | Describes the region in which the fee is assessed. Allowable Values: 255 char max |
| fee_attributes.status string Optional | Describes the status of the fee. Allowable Values: 255 char max |
| fee_attributes.transaction_type string Optional | Specifies the transaction type in which the fee was assessed. Allowable Values: - authorization- authorization.atm.withdrawal- balanceinquiry- fee.charge- pindebit.atm.withdrawal- pindebit.authorization- pindebit.balanceinquiry |
| name string Required | Name of the fee request. Allowable Values: 1–50 chars |
| tags string Optional | Descriptive metadata about the fee. Allowable Values: 1–255 chars |
| memo string Optional | Additional text describing the fee. Allowable Values: 1–255 chars |
| token string Optional | Unique identifier of the fee. If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so Marqeta recommends that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated. Allowable Values: 1–36 chars |
| type string Optional | Specifies if the fee is a flat fee or a percentage of the transaction amount. Allowable Values: FLAT, PERCENTAGE |
Sample request body
JSON
{
"token": "my_fee_01",
"amount": 1,
"name": "My Fee 01",
"currency_code": "USD",
"tags": "My Tags"
}
Response body
| Fields | Description |
|---|---|
| active boolean Returned | Specifies whether the fee is active. Allowable Values: true, falseDefault value: true |
| amount decimal Returned | Amount of the fee. Allowable Values: decimal Format: 0.00 |
| category string Conditionally returned | Specifies if the fee is a standalone fee or a real-time fee. Allowable Values: REALTIME, STANDALONE |
| created_time datetime Returned | Date and time when the fees object was created, in UTC.Allowable Values: datetime Format: yyyy-MM-ddThh:mm:ssZ |
| currency_code string Returned | Three-digit ISO 4217 currency code. Allowable Values: Valid three-digit ISO 4217 currency code |
| fee_attributes object Conditionally returned | Describes the attributes of a fee. Allowable Values: reason, region, status, transaction_type |
| fee_attributes.reason string Conditionally returned | Describes the reason for the fee. Allowable Values: 255 char max |
| fee_attributes.region string Conditionally returned | Describes the region in which the fee is assessed. Allowable Values: 255 char max |
| fee_attributes.status string Conditionally returned | Describes the status of the fee. Allowable Values: 255 char max |
| fee_attributes.transaction_type string Conditionally returned | Specifies the transaction type in which the fee was assessed. Allowable Values: - authorization- authorization.atm.withdrawal- balanceinquiry- fee.charge- pindebit.atm.withdrawal- pindebit.authorization- pindebit.balanceinquiry |
| last_modified_time datetime Returned | Date and time when the fees object was last modified, in UTC.Allowable Values: datetime Format: yyyy-MM-ddThh:mm:ssZ |
| name string Returned | Name of the fee. Allowable Values: 50 char max |
| tags string Conditionally returned | Descriptive metadata about the fee. Allowable Values: 255 char max |
| memo string Conditionally returned | Additional text describing the fee. Allowable Values: 1–255 chars |
| token string Returned | Unique identifier of the fees object.Allowable Values: 36 char max |
| type string Conditionally returned | Specifies if the fee is a flat fee or a percentage of the transaction amount. Allowable Values: FLAT, PERCENTAGE |
Sample response body
JSON
{
"token": "my_fee_01",
"active": true,
"name": "My Fee 01",
"amount": 1,
"tags": "My Tags",
"created_time": "2024-05-11T17:57:21Z",
"last_modified_time": "2024-05-11T17:57:21Z",
"currency_code": "USD"
}