Retrieve payment schedule transitions
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions"
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/{payment_schedule_token}/transitions', 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/{payment_schedule_token}/transitions",
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/{payment_schedule_token}/transitions"
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/{payment_schedule_token}/transitions")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions")
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": "transition1",
"status": "TERMINATED",
"created_time": "2023-08-23T11:25:34.342Z",
"updated_time": "2023-08-23T11:25:34.342Z",
"account_token": "account1",
"payment_schedule_token": "payment1"
},
{
"token": "transition2",
"status": "ACTIVE",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z",
"account_token": "account2",
"payment_schedule_token": "payment2"
}
],
"count": 2,
"is_more": false,
"end_index": 1,
"start_index": 0
}{
"code": 123,
"message": "<string>"
}Payment Schedule Transitions
Retrieve payment schedule transitions
Retrieve an array of payment schedule transitions on a specific credit account.
GET
/
credit
/
accounts
/
{account_token}
/
paymentschedules
/
{payment_schedule_token}
/
transitions
Retrieve payment schedule transitions
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions"
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/{payment_schedule_token}/transitions', 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/{payment_schedule_token}/transitions",
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/{payment_schedule_token}/transitions"
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/{payment_schedule_token}/transitions")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}/transitions")
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": "transition1",
"status": "TERMINATED",
"created_time": "2023-08-23T11:25:34.342Z",
"updated_time": "2023-08-23T11:25:34.342Z",
"account_token": "account1",
"payment_schedule_token": "payment1"
},
{
"token": "transition2",
"status": "ACTIVE",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z",
"account_token": "account2",
"payment_schedule_token": "payment2"
}
],
"count": 2,
"is_more": false,
"end_index": 1,
"start_index": 0
}{
"code": 123,
"message": "<string>"
}GET//////
Retrieve an array of payment schedule transitions on a specific credit account.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | Unique identifier of the credit account for which you want to retrieve payment schedule transitions. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| payment_schedule_token string Required | Unique identifier of the payment schedule for which you want to retrieve transitions. Send a GET request to /credit/accounts/{account_token}/paymentschedules to retrieve existing payment schedule tokens.Allowable Values: Existing payment schedule token |
URL query parameters
| Fields | Description |
|---|---|
| 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 createdTime, and not by the field names appearing in response bodies such as created_time.Allowable Values: createdTime, -createdTime |
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 schedule transitions. Allowable Values: Valid array of one or more payment schedule transition objects |
| data[].token string Conditionally returned | Unique identifier of the payment schedule transition. Allowable Values: 36 char max |
| data[].account_token string Conditionally returned | Unique identifier of the credit account on which to transition a payment schedule. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| data[].payment_schedule_token string Conditionally returned | Unique identifier of the payment schedule whose status is to transition. Send a GET request to /credit/accounts/{account_token}/paymentschedules to retrieve existing payment schedule tokens.Allowable Values: Existing payment schedule token |
| data[].status string Conditionally returned | Status of the payment schedule. Allowable Values: ACTIVE, COMPLETED, TERMINATED |
| data[].created_time datetime Conditionally returned | Date and time when the payment schedule transition 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 transition 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": "transition1",
"account_token": "account1",
"payment_schedule_token": "payment1",
"status": "TERMINATED",
"created_time": "2023-08-23T11:25:34.342Z",
"updated_time": "2023-08-23T11:25:34.342Z"
},
{
"token": "transition2",
"account_token": "account2",
"payment_schedule_token": "payment2",
"status": "ACTIVE",
"created_time": "2023-08-22T22:17:11.407Z",
"updated_time": "2023-08-22T22:17:11.407Z"
}
]
}
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 createdTime, and not by the field names appearing in response bodies such as created_time.
Available options:
createdTime, -createdTime Response
Expected response to a valid request
Returns paginated information for multiple payment schedule transitions.
Was this page helpful?