Retrieve account statement year-to-date totals
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate"
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}/statements/{statement_summary_token}/yeartodate', 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}/statements/{statement_summary_token}/yeartodate",
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}/statements/{statement_summary_token}/yeartodate"
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}/statements/{statement_summary_token}/yeartodate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate")
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": "c40b683b-ad88-51b6-a1fa-bc9961bc011e",
"total_fees": 0,
"created_time": "2021-07-01T00:27:09Z",
"account_token": "my_account_token_12",
"total_interest": 0,
"statement_token": "c07918af-2ffa-4da9-972c-6b3d24b2a772"
}{
"code": 123,
"message": "<string>"
}Statements
Retrieve account statement year-to-date totals
Retrieve the year-to-date fee and interest totals on a credit account’s statement summary.
GET
/
credit
/
accounts
/
{account_token}
/
statements
/
{statement_summary_token}
/
yeartodate
Retrieve account statement year-to-date totals
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate"
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}/statements/{statement_summary_token}/yeartodate', 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}/statements/{statement_summary_token}/yeartodate",
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}/statements/{statement_summary_token}/yeartodate"
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}/statements/{statement_summary_token}/yeartodate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/yeartodate")
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": "c40b683b-ad88-51b6-a1fa-bc9961bc011e",
"total_fees": 0,
"created_time": "2021-07-01T00:27:09Z",
"account_token": "my_account_token_12",
"total_interest": 0,
"statement_token": "c07918af-2ffa-4da9-972c-6b3d24b2a772"
}{
"code": 123,
"message": "<string>"
}GET//////
Retrieve the year-to-date fee and interest totals on a credit account’s statement summary.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | The unique identifier of the credit account from which to retrieve statement year-to-date totals. Send a GET request to /credit/accounts to retrieve existing credit account tokens.Allowable Values: Existing account token |
| statement_summary_token string Required | The unique identifier of the statement summary from which to retrieve year-to-date totals. Send a GET request to /credit/accounts/{token}/statements/ to retrieve existing statement summary tokens.Allowable Values: Existing statement summary token |
Response body
| Fields | Description |
|---|---|
| token uuid Conditionally returned | Unique identifier of the year-to-date total. Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the associated credit account. Allowable Values: 36 char max Existing account token |
| statement_token uuid Returned | Unique identifier of the statement summary from which to retrieve year-to-date totals. Allowable Values: Existing statement summary token |
| total_fees decimal Returned | Total fees charged year-to-date. Allowable Values: Format: 0.00 |
| total_interest decimal Returned | Total interest charged year-to-date. Allowable Values: Format: 0.00 |
| created_time datetime Conditionally returned | Date and time when the year-to-date total was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "c40b683b-ad88-51b6-a1fa-bc9961bc011e",
"account_token": "my_account_token_12",
"statement_token": "c07918af-2ffa-4da9-972c-6b3d24b2a772",
"total_fees": 0,
"total_interest": 0,
"created_time": "2021-07-01T00:27:09Z"
}
Authorizations
Path Parameters
Response
A JSON object containing year-to-date information
Contains information about year-to-date totals for an account.
Was this page helpful?