Get cashback balance
Returns the consolidated cashback balance for the authenticated company.
The companyId is obtained from the authenticated server context (req.user.companyId) and is not sent by the client.
curl -X GET "https://api-sandbox.contasimples.com/credit-cards/v1/cashback" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api-sandbox.contasimples.com/credit-cards/v1/cashback"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api-sandbox.contasimples.com/credit-cards/v1/cashback", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-sandbox.contasimples.com/credit-cards/v1/cashback", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api-sandbox.contasimples.com/credit-cards/v1/cashback')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"remainingAmount": 1280.55,
"updatedAt": "2025-01-01T00:00:00.000Z",
"expiresAt": "2025-01-31T00:00:00.000Z"
}
{
"error": "Unauthorized",
"message": "Invalid or expired access token.",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"code": 401
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred while processing the request.",
"requestId": "123e4567-e89b-12d3-a456-426614174000",
"code": 500
}
GET
/credit-cards/v1/cashback
GET
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token
Bearer Tokenstring
RequiredBearer token from OAuth 2.0 client credentials. Format: Bearer TOKEN
Bearer token from OAuth 2.0 client credentials. Format:
Bearer TOKENRequest Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. Bearer token from OAuth 2.0 client credentials. Format: Bearer TOKEN
Responses
remainingAmountnumber
RequiredConsolidated remaining cashback balance in BRL.
updatedAtstring
RequiredDate of the most recent cashback movement (last withdrawal/deposit), in ISO 8601.
expiresAtstring
RequiredDate of the nearest cashback expiration in ISO 8601. Returns null when nothing is expiring soon.
Was this page helpful?