SendlySendly
API ReferenceBilling

Start pay-as-you-go checkout

POST
/api/users/me/projects/{id}/checkout

A dashboard session gets the Stripe Checkout URL. Any other caller gets { status: "action_required", url, expires_in, what, instruction }: a /go/ link that works once, for 15 minutes, for the signed-in owner.

Requires the billing:write scope — Start a checkout, change spending limits, open the billing portal, cancel or refund.

Authorization

better-auth.session_token<token>

BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.

In: cookie

Path Parameters

id*string

Project id.

Query Parameters

currency?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/users/me/projects/string/checkout"
{
  "url": "http://example.com",
  "status": "action_required",
  "expires_in": 0,
  "what": "string",
  "instruction": "string"
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}