curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/policies/aprs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold APR Policy",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
}
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/policies/aprs"
payload = {
"name": "Gold APR Policy",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
}
}
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 APR Policy',
purchases: {
name: 'A purchase at a merchant',
tiers: [{apr: 0, margin_rate: 1}, {apr: 0, margin_rate: 5}],
external_token: 'my_external_purchase_token1234'
}
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/policies/aprs', 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/aprs",
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 APR Policy',
'purchases' => [
'name' => 'A purchase at a merchant',
'tiers' => [
[
'apr' => 0,
'margin_rate' => 1
],
[
'apr' => 0,
'margin_rate' => 5
]
],
'external_token' => 'my_external_purchase_token1234'
]
]),
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/aprs"
payload := strings.NewReader("{\n \"name\": \"Gold APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\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/aprs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/policies/aprs")
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 APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "Gold APR Policy",
"token": "my_apr_policy_token_1234",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
},
"description": "A gold APR policy",
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z",
"effective_date": "2025-05-01"
}{
"code": 123,
"message": "<string>"
}Create APR policy
Create a new annual percentage rate (APR) policy.
curl --request POST \
--url https://sandbox-api.marqeta.com/v3/credit/policies/aprs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gold APR Policy",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
}
}
'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/policies/aprs"
payload = {
"name": "Gold APR Policy",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
}
}
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 APR Policy',
purchases: {
name: 'A purchase at a merchant',
tiers: [{apr: 0, margin_rate: 1}, {apr: 0, margin_rate: 5}],
external_token: 'my_external_purchase_token1234'
}
})
};
fetch('https://sandbox-api.marqeta.com/v3/credit/policies/aprs', 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/aprs",
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 APR Policy',
'purchases' => [
'name' => 'A purchase at a merchant',
'tiers' => [
[
'apr' => 0,
'margin_rate' => 1
],
[
'apr' => 0,
'margin_rate' => 5
]
],
'external_token' => 'my_external_purchase_token1234'
]
]),
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/aprs"
payload := strings.NewReader("{\n \"name\": \"Gold APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\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/aprs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/policies/aprs")
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 APR Policy\",\n \"purchases\": {\n \"name\": \"A purchase at a merchant\",\n \"tiers\": [\n {\n \"apr\": 0,\n \"margin_rate\": 1\n },\n {\n \"apr\": 0,\n \"margin_rate\": 5\n }\n ],\n \"external_token\": \"my_external_purchase_token1234\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "Gold APR Policy",
"token": "my_apr_policy_token_1234",
"purchases": {
"name": "A purchase at a merchant",
"tiers": [
{
"apr": 0,
"margin_rate": 1
},
{
"apr": 0,
"margin_rate": 5
}
],
"external_token": "my_external_purchase_token1234"
},
"description": "A gold APR policy",
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z",
"effective_date": "2025-05-01"
}{
"code": 123,
"message": "<string>"
}Request body
| Fields | Description |
|---|---|
| token string Optional | Unique identifier of the APR policy. Allowable Values: 36 char max |
| name string Required | Name of the APR policy. Allowable Values: 255 char max |
| description string Optional | Description of the APR policy. Allowable Values: 255 char max |
| purchases object Required | Contains information on the pricing strategy for purchases. Allowable Values: Existing purchases object |
| purchases.name string Optional | Name of the pricing strategy. Allowable Values: 255 char max |
| purchases.external_token string Optional | Unique identifier of the external pricing strategy for the credit program. Allowable Values: Valid external pricing strategy token |
| purchases.tiers array of objects Required | One or more risk tiers for a pricing strategy. Allowable Values: One or more tiers objects |
| purchases.tiers[].margin_rate decimal Required | Number of percentage points added to the prime rate, used to calculate a variable APR value. Allowable Values: Format: 0.00 |
Sample request body
{
"token": "my_apr_policy_token_1234",
"name": "Gold APR Policy",
"description": "A gold APR policy",
"purchases": {
"name": "A purchase at a merchant",
"external_token": "my_external_purchase_token1234",
"tiers": [
{
"margin_rate": 1,
"apr": 0
},
{
"margin_rate": 5,
"apr": 0
}
]
}
}
Response body
| Fields | Description |
|---|---|
| token string Conditionally returned | Unique identifier of the APR policy. Allowable Values: 36 char max |
| name string Conditionally returned | Name of the APR policy. Allowable Values: 255 char max |
| description string Conditionally returned | Description of the APR policy. Allowable Values: 255 char max |
| purchases object Conditionally returned | Contains information on the pricing strategy for purchases. Allowable Values: Existing purchases object |
| purchases.name string Conditionally returned | Name of the pricing strategy. Allowable Values: 255 char max |
| purchases.external_token string Conditionally returned | Unique identifier of the pricing strategy on a credit program. Allowable Values: 36 char max |
| purchases.tiers array of objects Conditionally returned | One or more risk tiers for a pricing strategy. Allowable Values: One or more tiers objects |
| purchases.tiers[].margin_rate decimal Conditionally returned | Margin rate for the risk tier for a pricing strategy. Allowable Values: Format: 0.00 |
| purchases.tiers[].apr decimal Conditionally returned | Value of the APR. Allowable Values: Format: 0.00 |
| effective_date date Conditionally returned | Date the APR goes into effect, in UTC. Allowable Values: Format: yyyy-MM-dd |
| created_time datetime Conditionally returned | Date and time when the APR 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 APR policy was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
{
"token": "my_apr_policy_token_1234",
"name": "Gold APR Policy",
"description": "A gold APR policy",
"purchases": {
"name": "A purchase at a merchant",
"external_token": "my_external_purchase_token1234",
"tiers": [
{
"margin_rate": 1,
"apr": 0
},
{
"margin_rate": 5,
"apr": 0
}
]
},
"effective_date": "2025-05-01",
"created_time": "2025-04-01T23:41:58.802Z",
"updated_time": "2025-04-05T16:04:48.643Z"
}
Authorizations
Body
Request details for an APR policy.
Type of credit product.
REVOLVING - Allows users to continuously borrow and pay debts up to the credit limit.
CHARGE_CARD - Requires the cardholder to pay the full statement balance each billing cycle.
Gated per-program by the program.charge_card_enabled enrollment column; only enrolled programs
may create or update products of this type.
REVOLVING, CHARGE_CARD Response
Expected response
Contains information on an APR policy.
Type of credit product.
REVOLVING - Allows users to continuously borrow and pay debts up to the credit limit.
CHARGE_CARD - Requires the cardholder to pay the full statement balance each billing cycle.
Gated per-program by the program.charge_card_enabled enrollment column; only enrolled programs
may create or update products of this type.
REVOLVING, CHARGE_CARD Was this page helpful?