Retrieve account statement summary
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_token}")
.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}")
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{
"fees": 0,
"token": "acc0544e-4075-fe67-93dd-6b5cd443adb1",
"credits": 0,
"interest": 0,
"payments": 0,
"purchases": 200,
"cycle_type": "BEGINNING_REVOLVING",
"closing_date": "2021-07-01T00:27:09Z",
"created_time": "2021-07-01T00:27:09Z",
"credit_limit": 10000,
"opening_date": "2021-07-01T00:27:09Z",
"account_token": "my_account_token_12",
"closing_balance": 2000,
"opening_balance": 1000,
"past_due_amount": 0,
"available_credit": 800,
"days_in_billing_cycle": 31
}{
"code": 123,
"message": "<string>"
}Statements
Retrieve account statement summary
Retrieve a statement summary for a credit account.
GET
/
credit
/
accounts
/
{account_token}
/
statements
/
{statement_summary_token}
Retrieve account statement summary
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_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}/statements/{statement_summary_token}")
.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}")
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{
"fees": 0,
"token": "acc0544e-4075-fe67-93dd-6b5cd443adb1",
"credits": 0,
"interest": 0,
"payments": 0,
"purchases": 200,
"cycle_type": "BEGINNING_REVOLVING",
"closing_date": "2021-07-01T00:27:09Z",
"created_time": "2021-07-01T00:27:09Z",
"credit_limit": 10000,
"opening_date": "2021-07-01T00:27:09Z",
"account_token": "my_account_token_12",
"closing_balance": 2000,
"opening_balance": 1000,
"past_due_amount": 0,
"available_credit": 800,
"days_in_billing_cycle": 31
}{
"code": 123,
"message": "<string>"
}GET/////
Retrieve a statement summary for a credit account.
URL path parameters
| Fields | Description |
|---|---|
| account_token string Required | The unique identifier of the credit account for which you want to retrieve a statement summary. 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 to retrieve. 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 Returned | Unique identifier of the statement summary. Allowable Values: 36 char max |
| account_token string Returned | Unique identifier of the credit account on which the statement summary is generated. Allowable Values: 36 char max Existing account token |
| opening_balance decimal Returned | Balance of the credit account when the statement period began. Allowable Values: Format: 0.00 |
| closing_balance decimal Returned | Balance of the credit account when the statement period ended. Allowable Values: Format: 0.00 |
| credit_limit decimal Conditionally returned | Maximum balance the credit account can carry, as of the statement closing date. Allowable Values: Format: 0.00 |
| available_credit decimal Returned | Amount available to spend on the credit account, as of the statement closing date. Allowable Values: Format: 0.00 |
| past_due_amount decimal Returned | Total payment amount, required to make the account current. Allowable Values: Format: 0.00 |
| purchases decimal Returned | Total amount of purchases made during the statement period. Allowable Values: Format: 0.00 |
| interest decimal Returned | Total amount of interest charged during the statement period. Allowable Values: Format: 0.00 |
| fees decimal Returned | Total amount of fees charged during the statement period. Does not include periodic fees. Allowable Values: Format: 0.00 |
| credits decimal Returned | Total amount of credits received during the statement period. Allowable Values: Format: 0.00 |
| payments decimal Returned | Total amount of payments made during the statement period. Allowable Values: Format: 0.00 |
| days_in_billing_cycle integer Returned | Number of days in the billing cycle, also known as the statement period. Allowable Values: Any integer |
| cycle_type string Returned | Type of cycle. - BEGINNING_REVOLVING - Account is beginning to revolve and just started carrying a balance from the previous month.- REVOLVING - Account is revolving and has been carrying a balance from month to month for more than one month.- END_REVOLVING - Account is no longer revolving and the previous month’s balance is paid off.- TRANSACTING - Account is not revolving and the balance is paid off each month.Allowable Values: BEGINNING_REVOLVING, REVOLVING, END_REVOLVING, TRANSACTINGWhen creating or updating an account, only TRANSACTING is allowed. |
| opening_date datetime Returned | Date and time when the statement period began. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| closing_date datetime Returned | Date and time when the statement period ended. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
| created_time datetime Returned | Date and time when the statement summary was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "acc0544e-4075-fe67-93dd-6b5cd443adb1",
"account_token": "my_account_token_12",
"opening_balance": 1000,
"closing_balance": 2000,
"credit_limit": 10000,
"available_credit": 800,
"past_due_amount": 0,
"purchases": 200,
"interest": 0,
"fees": 0,
"credits": 0,
"payments": 0,
"days_in_billing_cycle": 31,
"cycle_type": "BEGINNING_REVOLVING",
"opening_date": "2021-07-01T00:27:09Z",
"closing_date": "2021-07-01T00:27:09Z",
"created_time": "2021-07-01T00:27:09Z"
}
Authorizations
Path Parameters
Response
A JSON object containing statement_summary information
Contains the summary data for an account's monthly statement.
Type of cycle.
BEGINNING_REVOLVING- Account is beginning to revolve and just started carrying a balance from the previous month.REVOLVING- Account is revolving and has been carrying a balance from month to month for more than one month.END_REVOLVING- Account is no longer revolving and the previous month's balance is paid off.TRANSACTING- Account is not revolving and the balance is paid off each month.NON_REVOLVING- Account never revolves; interest is not charged regardless of carried balance. Applies to charge card accounts.
Available options:
BEGINNING_REVOLVING, REVOLVING, END_REVOLVING, TRANSACTING, NON_REVOLVING Was this page helpful?