Create Fee

Action: POST
Endpoint: /fees

To create a fee, send a POST request to the /fees endpoint and include the source details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

Body Field Details

Name Type Required? Description Allowable Values
token string No The 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 we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
name string Yes The name of the fee request. 50 char max
currency_code string Yes The 3-character ISO 4217 currency code. The 3-character ISO 4217 currency code.

"USD" currently supported.
amount decimal Yes The amount of the fee. 0.00
active boolean No Indicates whether the fee is active. true | false

Default: true
real_time_assessment object No Controls the assessment of real-time fees.
tags string No Descriptive metadata about the fee. 99 char max

real_time_assessment

Name Type Required? Description Allowable Values
international_enabled boolean No Enables fee assessments where the origin of the transaction acquirer is outside the US. true | false
domestic_enabled boolean No Enables fee assessments where the origin of the transaction acquirer is inside the US. true | false
transaction_type string No Indicates the type of transactions on which the fee is assessed. authorization | pindebit.atm.withdrawal | pindebit

Sample Request Body

{
"token": "my_fee_01",
"amount": "1.00",
"name": "My Fee 01",
"currency_code": "USD",
"real_time_assessment": {
"international_enabled": true,
"domestic_enabled": true,
"transaction_type": "authorization"
},
"tags": "My Tags"
}

Sample Response Body

{
"token": "my_fee_01",
"active": true,
"name": "My Fee 01",
"amount": 1,
"tags": "My Tags",
"created_time": "2017-05-11T17:57:21Z",
"last_modified_time": "2017-05-11T17:57:21Z",
"currency_code": "USD",
"real_time_assessment": {
"transaction_type": "authorization",
"international_enabled": true,
"domestic_enabled": true
}
}


Retrieve Fee

Action: GET
Endpoint: /fees/{token}

To retrieve a fee, issue a GET request to the /fees/{token} endpoint. Include the token path parameter to specify the fee to return.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the fee to retrieve. Existing fee token.

Issue a GET to /fees to retrieve fee tokens.

Sample Response Body

{
"token": "my_fee_01",
"active": true,
"name": "My Fee 01",
"amount": 1,
"tags": "My Tags",
"created_time": "2017-05-11T17:57:21Z",
"last_modified_time": "2017-05-11T17:57:21Z",
"currency_code": "USD",
"real_time_assessment": {
"transaction_type": "authorization",
"international_enabled": true,
"domestic_enabled": true
}
}


Update Fee

Action: PUT
Endpoint: /fees/{token}

To update a fee, send a PUT request to the /fees/{token} endpoint. Include the token as a path parameter to indicate the fee to update.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the fee to update. Existing fee token.

Issue a GET to /fees to retrieve fee tokens.

Body Field Details

Name Type Required? Description Allowable Values
name string Yes The name of the fee request. 50 char max
currency_code decimal Yes The 3-character ISO 4217 currency code. The 3-character ISO 4217 currency code.

"USD" currently supported.
amount decimal Yes The amount of the fee. 0.00
active boolean No Indicates whether the fee is active. true | false

Default: true
real_time_assessment object No Controls the assessment of real-time fees.
tags string No Descriptive metadata about the fee. 99 char max

real_time_assessment

Name Type Required? Description Allowable Values
international_enabled boolean No Enables fee assessments where the origin of the transaction acquirer is outside the US. true | false
domestic_enabled boolean No Enables fee assessments where the origin of the transaction acquirer is inside the US. true | false
transaction_type string No Indicates the type of transactions on which the fee is assessed. authorization | pindebit.atm.withdrawal | pindebit

Sample Request Body

{
"active": false
}

Sample Response Body

{
"token": "my_fee_01",
"active": false,
"name": "My Fee 01",
"amount": 1,
"tags": "My Tags",
"created_time": "2017-05-11T17:57:21Z",
"last_modified_time": "2017-05-11T17:57:21Z",
"currency_code": "USD",
"real_time_assessment": {
"transaction_type": "authorization",
"international_enabled": true,
"domestic_enabled": true
}
}


List Fees

Action: GET
Endpoint: /fees

To list existing fees, issue a GET request to the /fees endpoint.

This endpoint supports field filtering and pagination.

Sample Response Body

{
"count": 2,
"start_index": 0,
"end_index": 1,
"is_more": false,
"data": [
{
"token": "my_fee_02",
"active": true,
"name": "My Fee 02",
"amount": 3,
"tags": "My Tags",
"created_time": "2017-05-11T18:03:39Z",
"last_modified_time": "2017-05-11T18:03:39Z",
"currency_code": "USD",
"real_time_assessment": {
"transaction_type": "authorization",
"international_enabled": true,
"domestic_enabled": true
}
},
{
"token": "my_fee_01",
"active": true,
"name": "My Fee 01",
"amount": 1,
"tags": "My Tags",
"created_time": "2017-05-11T17:57:21Z",
"last_modified_time": "2017-05-11T17:57:21Z",
"currency_code": "USD",
"real_time_assessment": {
"transaction_type": "authorization",
"international_enabled": true,
"domestic_enabled": true
}
}
]
}