Retrieve account statement rewards
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/rewards \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/rewards"
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}/rewards', 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}/rewards",
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}/rewards"
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}/rewards")
.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}/rewards")
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": "account_statement_reward1234",
"created_time": "2022-09-01T00:27:09Z",
"current_billing_cycle_reward": 0,
"previous_billing_cycle_reward": 0
}{
"code": 123,
"message": "<string>"
}Statements
Retrieve account statement rewards
Retrieve the rewards on a credit account’s statement summary.
GET
/
credit
/
accounts
/
{account_token}
/
statements
/
{statement_summary_token}
/
rewards
Retrieve account statement rewards
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/rewards \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://sandbox-api.marqeta.com/v3/credit/accounts/{account_token}/statements/{statement_summary_token}/rewards"
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}/rewards', 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}/rewards",
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}/rewards"
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}/rewards")
.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}/rewards")
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": "account_statement_reward1234",
"created_time": "2022-09-01T00:27:09Z",
"current_billing_cycle_reward": 0,
"previous_billing_cycle_reward": 0
}{
"code": 123,
"message": "<string>"
}GET//////
Retrieve the rewards 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 rewards. 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 rewards. 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 string Conditionally returned | Unique identifier of the rewards for a specific statement. Allowable Values: 36 char max |
| previous_billing_cycle_reward decimal Conditionally returned | Amount of rewards received in the previous billing cycle. Allowable Values: Format: 0.00 |
| current_billing_cycle_reward decimal Conditionally returned | Amount of rewards received in the current billing cycle. Allowable Values: Format: 0.00 |
| created_time datetime Conditionally returned | Date and time when the statement reward was created on Marqeta’s credit platform, in UTC. Allowable Values: Format: yyyy-MM-ddThh:mm:ssZ |
Sample response body
JSON
{
"token": "account_statement_reward1234",
"previous_billing_cycle_reward": 0,
"current_billing_cycle_reward": 0,
"created_time": "2022-09-01T00:27:09Z"
}
Authorizations
Path Parameters
Response
Expected response to a valid request
Contains information on statement rewards.
Was this page helpful?