Skip to main content
GET

Overview

After a successful checkout, use this endpoint to verify the payment was processed and credits were added to the account. This is useful as a fallback in case the webhook wasn’t processed.
Credits are typically added automatically via Stripe webhooks. This endpoint provides a manual verification option for edge cases or client-side confirmation.
For third-party integrations: Use GET /credits/verify-session/{sessionId}/api with API Key authentication instead.

Authentication

string
required
Your JWT access token (session auth). Format: Bearer YOUR_ACCESS_TOKEN

Path Parameters

string
required
The Stripe checkout session ID returned from /credits/checkout.

Response Fields

boolean
Whether the session verification was successful.
integer
Number of credits from the purchase.
string
The verified session ID.

Error Responses

Bad Request - Payment not completed or invalid session metadata.
Unauthorized - Invalid or missing token.
Forbidden - Session does not belong to the authenticated user.

Idempotency

This endpoint is idempotent. If the credits were already added (via webhook), it will not add them again. It will still return success with the credit amount.

Typical Flow

  1. User completes checkout at Stripe
  2. Stripe redirects to your successUrl
  3. Call this endpoint to verify and confirm credits
  4. Display confirmation to user
  5. Refresh credit balance in your UI
While this endpoint is available, the recommended flow is to listen for Stripe webhooks and update your UI based on the /credits/balance endpoint.

GET /credits/verify-session//api

This endpoint verifies a checkout session using API Key authentication. Ideal for third-party integrations.

Authentication

Requires API Key authentication. Include your API key in the Authorization header:

Path Parameters

Same as above.

Response

Same as above.