Skip to content

Schemas ​

Response Envelope ​

TransactCore uses two response formats depending on the endpoint:

Success (with data wrapper) ​

Used by GET /payment-intents/{id}:

json
{
  "data": {
    "payment_intent_id": "pi_3abc123",
    "amount": 3420,
    "currency": "usd",
    "status": "succeeded"
  }
}

Success (flat) ​

Used by POST /payment-intents and GET /config/stripe:

json
{
  "client_secret": "pi_3abc123_secret_xyz789",
  "payment_intent_id": "pi_3abc123",
  "publishable_key": "pk_live_xxxxx",
  "amount": 3420,
  "currency": "usd"
}

Error ​

json
{
  "error": "Error message describing what went wrong",
  "message": "Additional details (optional)"
}

error is not always a string

When an endpoint is relaying an error Stripe returned, error is an object (type, code, decline_code, param, message, request_id) rather than a string — this is how Create Payment Intent reports card declines and Stripe API errors. Refund Payment Intent keeps error a string and puts the same structure in a separate stripe_error key. Check the shape before treating error as text.

Validation Error ​

json
{
  "message": "The amount field must be at least 50.",
  "errors": {
    "amount": ["The amount field must be at least 50."]
  }
}

Common Error Codes ​

HTTP StatusErrorDescription
400Payment account cannot accept paymentsConnected account has incomplete onboarding or is restricted
401UnauthenticatedMissing or invalid Bearer token
403ForbiddenToken does not have the required scope
404Payment intent not foundNo payment intent exists with the given ID
404No payment account configuredOrganization has no connected Stripe account
404No completed transaction found for this payment intentIntent carries no succeeded charge to refund
400Payment intent cannot be canceledLocal state rules cancellation out (already succeeded or canceled)
400Payment intent cannot be capturedNot a manual capture intent awaiting capture
400Transaction cannot be refundedCharge did not succeed, or is already fully refunded
400Refund amount exceeds refundable amountRequested amount is above the charge's remaining balance
422Validation errorRequest body failed validation (see errors object)
422Unable to cancel payment intentLocal state allowed the attempt but the gateway refused it
422Refund could not be processedDeterministic Stripe error (4xx other than 429) — retrying will not help
429Too many requestsRate limit exceeded (100/min per IP on the ecommerce endpoints)
4xx/502Stripe API error objectCreate Payment Intent mirrors Stripe's own HTTP status, falling back to 502
500Failed to create/capture/refund …Non-Stripe failure, or a retryable Stripe 429/5xx on refund

Currency ​

All amounts are in the smallest currency unit (cents for USD).

AmountMeaning
50$0.50 (minimum)
3420$34.20
100000$1,000.00

The currency field accepts ISO 4217 three-letter codes. Default: usd.


Rate Limit Headers ​

All responses include rate limit information:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
Retry-AfterSeconds until reset (only on 429 responses)

All ecommerce endpoints: 100 requests per minute per IP address.


Hashkeys ​

TransactCore uses hashkeys as external identifiers for resources. Hashkeys are prefixed strings that encode internal IDs:

ResourcePrefixExample
Connected Accountcct_cct_00000k1L2m3N4o5
Organizationorg_org_00000k1L2m3N4o5

Payment intents use Stripe's native IDs (e.g., pi_3abc123) rather than hashkeys.


Changelog
DateChange
2026-09-12Noted that error is an object when relaying a Stripe error, and expanded the Common Error Codes table to cover the capture and refund paths.
2026-03-19Initial publication.

ShopHero CommerceCore Platform