Retrieve payment schedule
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}"
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}', 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}",
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}"
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}")
.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}")
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{
"token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
"amount": 2500,
"status": "COMPLETED",
"frequency": "ONCE",
"description": "Scheduled account payment",
"created_time": "2024-01-12T15:03:09.717Z",
"account_token": "12f10563-d5f2-11ec-889b-bd3a73e55331",
"currency_code": "USD",
"amount_category": "FIXED",
"payment_source_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
"next_payment_impact_date": "2024-01-31"
}{
"code": 123,
"message": "<string>"
}Payment Schedules
Retrieve payment schedule
Retrieve a single payment schedule on a specific credit account.
GET
/
credit
/
accounts
/
{account_token}
/
paymentschedules
/
{payment_schedule_token}
Retrieve payment schedule
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/paymentschedules/{payment_schedule_token}"
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}', 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}",
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}"
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}")
.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}")
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{
"token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
"amount": 2500,
"status": "COMPLETED",
"frequency": "ONCE",
"description": "Scheduled account payment",
"created_time": "2024-01-12T15:03:09.717Z",
"account_token": "12f10563-d5f2-11ec-889b-bd3a73e55331",
"currency_code": "USD",
"amount_category": "FIXED",
"payment_source_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
"next_payment_impact_date": "2024-01-31"
}{
"code": 123,
"message": "<string>"
}GET/////
Retrieve a single payment schedule 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 a payment schedule. 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 that you want to retrieve. Send a GET request to /credit/accounts/{account_token}/paymentschedules to retrieve existing payment schedule tokens.Allowable Values: Existing payment schedule token |
Response body
| Fields | Description |
|---|---|
| token string Returned | Unique identifier of the payment schedule. Allowable Values: 36 char max |
| payment_source_token string Returned | Unique identifier of a payment source. Allowable Values: Existing payment source token |
| account_token string Returned | Unique identifier of the credit account on which the payment schedule is made. Allowable Values: Existing account token |
| amount_category string Returned | A category used to determine the actual payment amount. Allowable Values: FIXED, MINIMUM_PAYMENT, REMAINING_STATEMENT_BALANCE, CURRENT_BALANCE |
| status string Returned | Status of the payment schedule. Allowable Values: ACTIVE, COMPLETED, TERMINATED |
| amount decimal Conditionally returned | Amount of the payment. Returned if the amount_category is FIXED.Allowable Values: Format: 0.00 |
| frequency string Returned | Defines how often to make a scheduled payment. Allowable Values: ONCE, MONTHLY |
| payment_day string Conditionally returned | Day on which monthly payments are made. Returned if the frequency is MONTHLY.Allowable Values: PAYMENT_DUE_DAY |
| 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 |
| currency_code string Returned | Valid three-digit ISO 4217 currency code. Allowable Values: USD |
| description string Conditionally returned | Description of the payment schedule. Allowable Values: 255 char max |
| 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 |
| 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
{
"token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
"account_token": "12f10563-d5f2-11ec-889b-bd3a73e55331",
"payment_source_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
"amount_category": "FIXED",
"status": "COMPLETED",
"amount": 2500,
"frequency": "ONCE",
"next_payment_impact_date": "2024-01-31",
"currency_code": "USD",
"description": "Scheduled account payment",
"created_time": "2024-01-12T15:03:09.717Z"
}
Authorizations
Path Parameters
Response
Expected response to a valid request.
A future one-time or recurring payment schedule.
Valid three-digit link:https://www.iso.org/iso-4217-currency-codes.html[ISO 4217 currency code, window="_blank"].
Available options:
USD Was this page helpful?