List payment schedules
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules', 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/accounts/{account_token}/paymentschedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"token": "mytoken",
"amount": null,
"status": "ACTIVE",
"frequency": "MONTHLY",
"description": "Sample payoff",
"payment_day": "PAYMENT_DUE_DAY",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z",
"account_token": "account1",
"currency_code": "USD",
"amount_category": "REMAINING_STATEMENT_BALANCE",
"payment_source_token": "source1",
"next_payment_impact_date": "2023-08-31"
},
{
"token": "mytoken1",
"amount": 100,
"status": "COMPLETED",
"frequency": "ONCE",
"description": "Sample payment",
"payment_day": "PAYMENT_DUE_DAY",
"created_time": "2023-07-22T22:13:31.426Z",
"updated_time": "2023-07-22T22:13:31.426Z",
"account_token": "account1",
"currency_code": "USD",
"amount_category": "FIXED",
"payment_source_token": "source1",
"next_payment_impact_date": "2023-08-10"
}
],
"count": 2,
"is_more": false,
"end_index": 1,
"start_index": 0
}{
"code": 123,
"message": "<string>"
}Payment Schedules
List payment schedules
Retrieve an array of payment schedules on a specific credit account.
GET
/
credit
/
accounts
/
{account_token}
/
paymentschedules
List payment schedules
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules', 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/accounts/{account_token}/paymentschedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"token": "mytoken",
"amount": null,
"status": "ACTIVE",
"frequency": "MONTHLY",
"description": "Sample payoff",
"payment_day": "PAYMENT_DUE_DAY",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z",
"account_token": "account1",
"currency_code": "USD",
"amount_category": "REMAINING_STATEMENT_BALANCE",
"payment_source_token": "source1",
"next_payment_impact_date": "2023-08-31"
},
{
"token": "mytoken1",
"amount": 100,
"status": "COMPLETED",
"frequency": "ONCE",
"description": "Sample payment",
"payment_day": "PAYMENT_DUE_DAY",
"created_time": "2023-07-22T22:13:31.426Z",
"updated_time": "2023-07-22T22:13:31.426Z",
"account_token": "account1",
"currency_code": "USD",
"amount_category": "FIXED",
"payment_source_token": "source1",
"next_payment_impact_date": "2023-08-10"
}
],
"count": 2,
"is_more": false,
"end_index": 1,
"start_index": 0
}{
"code": 123,
"message": "<string>"
}GET////
Retrieve an array of payment schedules on a specific credit account.
This endpoint supports sorting and pagination.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which you want to retrieve payment schedules. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
URL query parameters
| Fields | Description |
|---|---|
| statuses array of strings Optional | Status of the payment schedules to retrieve. Allowable Values: ACTIVE, COMPLETED, TERMINATED |
| frequency array of strings Optional | Frequency of the payment schedules to retrieve. Allowable Values: ONCE, MONTHLY |
| count integer Optional | Number of payment schedule resources to retrieve. Allowable Values: 1 min |
| start_index integer Optional | Sort order index of the first resource in the returned array. Allowable Values: 0 min |
| sort_by string Optional | Field on which to sort. Prefix the field name with a hyphen (-) to sort in descending order. Omit the hyphen to sort in ascending order.NOTE: You must sort using system field names such as lastModifiedTime, and not by the field names appearing in response bodies such as last_modified_time.Allowable Values: lastModifiedTime, -lastModifiedTime |
Response body
| Fields | Description |
|---|---|
| count integer Returned | Number of resources returned. Allowable Values: 1-10 |
| start_index integer Returned | Sort order index of the first resource in the returned array. Allowable Values: Any integer |
| end_index integer Returned | Sort order index of the last resource in the returned array. Allowable Values: Any integer |
| is_more boolean Returned | A value of true indicates that more unreturned resources exist.Allowable Values: true, false |
| data array of objects Returned | List of payment schedules. Allowable Values: Valid array of one or more payment schedule objects |
| data[].token string Returned | Unique identifier of the payment schedule. Allowable Values: 36 char max |
| data[].payment_source_token string Returned | Unique identifier of a payment source. Allowable Values: Existing payment source token |
| data[].account_token string Returned | Unique identifier of the credit account on which the payment schedule is made. Allowable Values: Existing account token |
| data[].amount_category string Returned | A category used to determine the actual payment amount. Allowable Values: FIXED, MINIMUM_PAYMENT, REMAINING_STATEMENT_BALANCE, CURRENT_BALANCE |
| data[].status string Returned | Status of the payment schedule. Allowable Values: ACTIVE, COMPLETED, TERMINATED |
| data[].amount decimal Conditionally returned | Amount of the payment. Returned if the amount_category is FIXED.Allowable Values: Format: 0.00 |
| data[].frequency string Returned | Defines how often to make a scheduled payment. Allowable Values: ONCE, MONTHLY |
| data[].payment_day string Conditionally returned | Day on which monthly payments are made. Returned if the frequency is MONTHLY.Allowable Values: PAYMENT_DUE_DAY |
| data[].next_payment_impact_date date Conditionally returned | Date to make a one-time payment. Returned if frequency is ONCE.Allowable Values: Format: yyyy-MM-dd |
| data[].currency_code string Returned | Valid three-digit ISO 4217 currency code. Allowable Values: USD |
| data[].description string Conditionally returned | Description of the payment schedule. Allowable Values: 255 char max |
| data[].created_time datetime Conditionally returned | Date and time when the payment schedule was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| data[].updated_time datetime Conditionally returned | Date and time when the payment schedule was last updated on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"count": 2,
"start_index": 0,
"end_index": 1,
"is_more": false,
"data": [
{
"token": "mytoken",
"payment_source_token": "source1",
"account_token": "account1",
"amount_category": "REMAINING_STATEMENT_BALANCE",
"status": "ACTIVE",
"amount": null,
"frequency": "MONTHLY",
"payment_day": "PAYMENT_DUE_DAY",
"next_payment_impact_date": "2023-08-31",
"currency_code": "USD",
"description": "Sample payoff",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z"
},
{
"token": "mytoken1",
"payment_source_token": "source1",
"account_token": "account1",
"amount_category": "FIXED",
"status": "COMPLETED",
"amount": 100,
"frequency": "ONCE",
"payment_day": "PAYMENT_DUE_DAY",
"next_payment_impact_date": "2023-08-10",
"currency_code": "USD",
"description": "Sample payment",
"created_time": "2023-07-22T22:13:31.426Z",
"updated_time": "2023-07-22T22:13:31.426Z"
}
]
}
Authorizations
Path Parameters
Query Parameters
Field on which to sort.
Prefix the field name with a hyphen (-) to sort in descending order.
Omit the hyphen to sort in ascending order.
NOTE:
You must sort using system field names such as lastModifiedTime, and not by the field names appearing in response bodies such as last_modified_time.
Available options:
lastModifiedTime, -lastModifiedTime Response
Expected response to a valid request.
Returns paginated information for multiple payment schedules.
Was this page helpful?