Create fee policy
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/policies/fees \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold Fee Policy",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
}
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/policies/fees"
payload = {
"name": "Gold Fee Policy",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold Fee Policy',
account: {
late_payment: {default_value: 10, default_method: 'FLAT'},
returned_payment: {default_value: 10, default_method: 'FLAT'},
foreign_transaction_fee: {default_value: 12.5, default_method: 'PERCENTAGE'}
}
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/policies/fees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.marqeta.com/v3/credit/policies/fees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Gold Fee Policy',
'account' => [
'late_payment' => [
'default_value' => 10,
'default_method' => 'FLAT'
],
'returned_payment' => [
'default_value' => 10,
'default_method' => 'FLAT'
],
'foreign_transaction_fee' => [
'default_value' => 12.5,
'default_method' => 'PERCENTAGE'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/policies/fees"
payload := strings.NewReader("{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.marqeta.com/v3/credit/policies/fees")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/policies/fees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "Gold Fee Policy",
"token": "my_fee_policy_token_1234",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
},
"description": "A gold fee policy",
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z"
}{
"code": 123,
"message": "<string>"
}Fee Policies
Create fee policy
Create a new fee policy.
POST
/
credit
/
policies
/
fees
Create fee policy
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/policies/fees \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold Fee Policy",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
}
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/policies/fees"
payload = {
"name": "Gold Fee Policy",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold Fee Policy',
account: {
late_payment: {default_value: 10, default_method: 'FLAT'},
returned_payment: {default_value: 10, default_method: 'FLAT'},
foreign_transaction_fee: {default_value: 12.5, default_method: 'PERCENTAGE'}
}
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/policies/fees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.marqeta.com/v3/credit/policies/fees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Gold Fee Policy',
'account' => [
'late_payment' => [
'default_value' => 10,
'default_method' => 'FLAT'
],
'returned_payment' => [
'default_value' => 10,
'default_method' => 'FLAT'
],
'foreign_transaction_fee' => [
'default_value' => 12.5,
'default_method' => 'PERCENTAGE'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/policies/fees"
payload := strings.NewReader("{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.marqeta.com/v3/credit/policies/fees")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/policies/fees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Gold Fee Policy\",\n \"account\": {\n \"late_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"returned_payment\": {\n \"default_value\": 10,\n \"default_method\": \"FLAT\"\n },\n \"foreign_transaction_fee\": {\n \"default_value\": 12.5,\n \"default_method\": \"PERCENTAGE\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "Gold Fee Policy",
"token": "my_fee_policy_token_1234",
"account": {
"late_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"returned_payment": {
"default_value": 10,
"default_method": "FLAT"
},
"foreign_transaction_fee": {
"default_value": 12.5,
"default_method": "PERCENTAGE"
}
},
"description": "A gold fee policy",
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z"
}{
"code": 123,
"message": "<string>"
}POST///
Create a new fee policy.
Request body
| Fields | Description |
|---|---|
| token string Optional | Unique identifier of the fee policy. Allowable Values: 36 char max |
| name string Required | Name of the fee policy. Allowable Values: 255 char max |
| description string Optional | Description of the fee policy. Allowable Values: 255 char max |
| account object Required | Contains information on the fees in an account’s fee policy. Allowable Values: Existing account object |
| account.late_payment object Optional | Contains information on the late payment fee. Allowable Values: Existing late_payment object |
| account.returned_payment object Optional | Contains information on the returned payment fee. Allowable Values: Existing returned_payment object |
| account.foreign_transaction_fee object Optional | Contains information on the foreign transaction fee. Allowable Values: Existing foreign_transaction_fee object |
| account.monthly_fee object Optional | Contains information on the monthly periodic fees. Allowable Values: Existing periodic_fees object |
| account.annual_fee object Optional | Contains information on the annual periodic fees. Allowable Values: Existing periodic_fees object |
Sample request body
JSON
{
"token": "my_fee_policy_token_1234",
"name": "Gold Fee Policy",
"description": "A gold fee policy",
"account": {
"late_payment": {
"default_method": "FLAT",
"default_value": 10
},
"returned_payment": {
"default_method": "FLAT",
"default_value": 10
},
"foreign_transaction_fee": {
"default_method": "PERCENTAGE",
"default_value": 12.5
}
}
}
Response body
| Fields | Description |
|---|---|
| token string Conditionally returned | Unique identifier of the fee policy. Allowable Values: 36 char max |
| name string Conditionally returned | Name of the fee policy. Allowable Values: 255 char max |
| description string Conditionally returned | Description of the fee policy. Allowable Values: 255 char max |
| account object Conditionally returned | Contains information on the fees in an account’s fee policy. Allowable Values: Existing account object |
| account.late_payment object Conditionally returned | Contains information on the late payment fee. Allowable Values: Existing late_payment object |
| account.returned_payment object Conditionally returned | Contains information on the returned payment fee. Allowable Values: Existing returned_payment object |
| account.foreign_transaction_fee object Conditionally returned | Contains information on the foreign transaction fee. Allowable Values: Existing foreign_transaction_fee object |
| account.monthly_fee object Conditionally returned | Contains information on the monthly periodic fees. Allowable Values: Existing periodic_fees object |
| account.annual_fee object Conditionally returned | Contains information on the annual periodic fees. Allowable Values: Existing periodic_fees object |
| created_time datetime Conditionally returned | Date and time when the fee policy was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| updated_time datetime Conditionally returned | Date and time when the fee policy was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "my_fee_policy_token_1234",
"name": "Gold Fee Policy",
"description": "A gold fee policy",
"account": {
"late_payment": {
"default_method": "FLAT",
"default_value": 10
},
"returned_payment": {
"default_method": "FLAT",
"default_value": 10
},
"foreign_transaction_fee": {
"default_method": "PERCENTAGE",
"default_value": 12.5
}
},
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z"
}
Authorizations
Body
application/json
Response
Expected response
Contains information on a fee policy.
Was this page helpful?