POST
/
v1
/
billing
/
{organizationId}
/
top-up
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.billingCreateTopUpSession({
  organizationId: process.env.OCTOSPARK_ORGANIZATION_ID ?? "organizationId",
  body: {},
})
{
  "id": "<string>",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

Body

application/json
amountDecimillicents
integer
required

a number less than or equal to 5000000000

Required range: 100000 <= x <= 5000000000
successUrl
string
required

a string matching the pattern ^https?://

Pattern: ^https?:\/\/
cancelUrl
string
required

a string matching the pattern ^https?://

Pattern: ^https?:\/\/

Response

Success

id
string
required
url
string
required