Data Models
Complete data model reference for all API objects.
Transaction
{
"transactionId": "txn_abc123",
"type": "sale",
"status": "approved",
"amount": 100.00,
"currency": "USD",
"authCode": "123456",
"avsResponse": "Y",
"cvvResponse": "M",
"card": {
"brand": "Visa",
"last4": "1111",
"expiryMonth": "12",
"expiryYear": "2027"
},
"billing": {
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zip": "10001",
"country": "US"
},
"customer": {
"customerId": "cust_456",
"email": "john@example.com"
},
"createdAt": "2026-01-28T12:00:00Z",
"updatedAt": "2026-01-28T12:00:00Z"
}
Subscription
{
"subscriptionId": "sub_abc123",
"customerId": "cust_456",
"planId": "plan_monthly",
"status": "active",
"amount": 99.00,
"currency": "USD",
"frequency": "monthly",
"startDate": "2026-01-01",
"nextBillingDate": "2026-02-01",
"trialEndsAt": null,
"cancelledAt": null,
"createdAt": "2026-01-01T00:00:00Z"
}
Invoice
{
"invoiceId": "inv_abc123",
"invoiceNumber": "INV-12345",
"customerId": "cust_456",
"status": "unpaid",
"amount": 500.00,
"currency": "USD",
"dueDate": "2026-02-15",
"items": [
{
"description": "Web Design Services",
"quantity": 1,
"unitPrice": 500.00,
"total": 500.00
}
],
"paidAmount": 0.00,
"remainingBalance": 500.00,
"createdAt": "2026-01-28T12:00:00Z"
}
Customer
{
"customerId": "cust_abc123",
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"billing": {
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zip": "10001",
"country": "US"
},
"paymentMethods": [
{
"paymentMethodId": "pm_123",
"type": "card",
"last4": "1111",
"brand": "Visa"
}
],
"createdAt": "2026-01-01T00:00:00Z"
}
Pagination
{
"page": 1,
"limit": 50,
"total": 1234,
"pages": 25
}
Error
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid card number",
"field": "card.number",
"details": {
"additionalInfo": "value"
}
}
}
Next: View all endpoints →