Get My Payment History
curl --request GET \
--url https://api.devkit4ai.com/api/v1/payments/stripe/my-payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devkit4ai.com/api/v1/payments/stripe/my-payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devkit4ai.com/api/v1/payments/stripe/my-payments', 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://api.devkit4ai.com/api/v1/payments/stripe/my-payments",
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: Bearer <token>"
],
]);
$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://api.devkit4ai.com/api/v1/payments/stripe/my-payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devkit4ai.com/api/v1/payments/stripe/my-payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devkit4ai.com/api/v1/payments/stripe/my-payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test_mode": true,
"payment_intent_id": "<string>",
"status": "<string>",
"amount_cents": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"refunded_amount_cents": 0
}
],
"total": 123,
"page": 123,
"page_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stripe Subscriptions
Get My Payment History
Get the current user’s Stripe payment history for the project
GET
/
api
/
v1
/
payments
/
stripe
/
my-payments
Get My Payment History
curl --request GET \
--url https://api.devkit4ai.com/api/v1/payments/stripe/my-payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devkit4ai.com/api/v1/payments/stripe/my-payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devkit4ai.com/api/v1/payments/stripe/my-payments', 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://api.devkit4ai.com/api/v1/payments/stripe/my-payments",
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: Bearer <token>"
],
]);
$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://api.devkit4ai.com/api/v1/payments/stripe/my-payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devkit4ai.com/api/v1/payments/stripe/my-payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devkit4ai.com/api/v1/payments/stripe/my-payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test_mode": true,
"payment_intent_id": "<string>",
"status": "<string>",
"amount_cents": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"refunded_amount_cents": 0
}
],
"total": 123,
"page": 123,
"page_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Retrieve a paginated list of payment transactions for the authenticated user within their project. Useful for displaying billing history and invoice records.
Authentication
This endpoint requires end user authentication via HTTP Bearer Token with project scope.
Query Parameters
boolean
default:"true"
Use test mode data. Set to
false for production payments.integer
default:"1"
Page number for pagination (minimum: 1)
integer
default:"50"
Number of payments per page (1-100)
Response
array
List of payment records
Show Payment object
Show Payment object
string (UUID)
Internal payment record ID
string (UUID)
Project the payment belongs to
string (UUID)
Related subscription (if recurring)
string (UUID)
User who made the payment
boolean
Whether this is a test mode payment
string
Stripe Payment Intent ID
string
Payment status:
succeeded, pending, failedinteger
Payment amount in cents
string
Three-letter currency code (e.g.,
usd)string
Payment description
integer
Amount refunded in cents (default: 0)
datetime
When payment was created
integer
Total number of payments
integer
Current page number
integer
Number of items per page
Example Request
curl -X GET "https://api.devkit4ai.com/api/v1/payments/stripe/my-payments?test_mode=true&page=1&page_size=10" \
-H "Authorization: Bearer {end_user_jwt}"
Example Response
{
"payments": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"project_id": "660e8400-e29b-41d4-a716-446655440000",
"subscription_id": "770e8400-e29b-41d4-a716-446655440000",
"user_id": "880e8400-e29b-41d4-a716-446655440000",
"is_test_mode": true,
"payment_intent_id": "pi_1ABC123def456",
"status": "succeeded",
"amount_cents": 2999,
"currency": "usd",
"description": "Pro Plan - Monthly",
"refunded_amount_cents": 0,
"created_at": "2026-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"project_id": "660e8400-e29b-41d4-a716-446655440000",
"subscription_id": "770e8400-e29b-41d4-a716-446655440000",
"user_id": "880e8400-e29b-41d4-a716-446655440000",
"is_test_mode": true,
"payment_intent_id": "pi_1DEF456ghi789",
"status": "succeeded",
"amount_cents": 2999,
"currency": "usd",
"description": "Pro Plan - Monthly",
"refunded_amount_cents": 0,
"created_at": "2025-12-15T10:30:00Z"
}
],
"total": 2,
"page": 1,
"page_size": 10
}
Formatting Amounts
Amounts are stored in cents. Convert to display format:function formatAmount(cents: number, currency: string): string {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: currency.toUpperCase()
}).format(cents / 100);
}
// formatAmount(2999, 'usd') → "$29.99"
Integration Example
// Billing history component
function BillingHistory() {
const [payments, setPayments] = useState([]);
const [page, setPage] = useState(1);
useEffect(() => {
fetch(`/api/my-payments?page=${page}`)
.then(res => res.json())
.then(data => setPayments(data.payments));
}, [page]);
return (
<table>
<thead>
<tr>
<th>Date</th>
<th>Description</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{payments.map(payment => (
<tr key={payment.id}>
<td>{formatDate(payment.created_at)}</td>
<td>{payment.description}</td>
<td>{formatAmount(payment.amount_cents, payment.currency)}</td>
<td><Badge>{payment.status}</Badge></td>
</tr>
))}
</tbody>
</table>
);
}
Payment Statuses
| Status | Description |
|---|---|
succeeded | Payment completed successfully |
pending | Payment processing in progress |
failed | Payment attempt failed |
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized - Invalid or missing authentication |
404 | Project not found or Stripe not configured |
422 | Validation error - Invalid pagination parameters |
Related Pages
Get My Subscription
View subscription status
Customer Portal
Access invoices in Stripe
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Use test mode
Required range:
x >= 1Required range:
1 <= x <= 100
