Skip to main content
GET
/
v1
/
billing
/
invoices
/
:id
/
pay-url
curl https://gpuoutlet.ai/v1/billing/invoices/inv_01H.../pay-url \
  --cookie "sid=$SID"
{
  "url": "https://invoice.stripe.com/i/acct_live_xxx/test_YWNjdF8x..."
}
Returns a freshly-resolved Stripe-hosted pay URL for an open invoice. Stripe-hosted invoice URLs rotate occasionally — embedding the cached hostedInvoiceUrl from GET /v1/billing/invoices/:id in a button is fine for display, but the dashboard’s Pay ↗ action calls this endpoint immediately before opening the URL so the user never lands on a stale 404.
id
string
required
Invoice id (inv_…). Must belong to the authenticated user.
url
string | null
Fresh Stripe-hosted pay URL. null if the Stripe-side invoice was never finalized (rare — only happens when the Stripe API call failed at creation time and the local row is still in draft state).
curl https://gpuoutlet.ai/v1/billing/invoices/inv_01H.../pay-url \
  --cookie "sid=$SID"
{
  "url": "https://invoice.stripe.com/i/acct_live_xxx/test_YWNjdF8x..."
}

When to call

  • Right before opening the pay page (most common use)
  • Polling for a “still open” check after the user said they paid — Stripe’s webhook handler may take a beat to flip our copy to paid
  • Auditing — comparing Stripe’s current URL against the one we stored at creation