Skip to main content
POST
/
charges
/
Create a charge
curl --request POST \
  --url https://api.kelviq.com/api/v1/charges/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planIdentifier": "lifetime-access",
  "chargePeriod": "ONE_TIME",
  "customerId": "cust_789",
  "features": [
    {
      "identifier": "seats",
      "quantity": 5
    }
  ],
  "currencyCode": "USD",
  "ipAddress": "103.154.35.20"
}
'
{
  "id": "7c2f3a91-2d4e-4a8b-9b1c-6f0a2e5d9c11",
  "startDate": "2026-06-20",
  "endDate": null,
  "billingPeriodStartTime": null,
  "billingPeriodEndTime": null,
  "amount": "49.00",
  "recurrence": "",
  "currency": "USD",
  "status": "active",
  "product": {
    "name": "Invoice Test",
    "id": "88e437b8-6017-405b-9328-e0f4e140bb79",
    "identifier": "invoice-test"
  },
  "plan": {
    "name": "Lifetime Access",
    "identifier": "lifetime-access"
  },
  "features": [],
  "trialDaysRemaining": 0,
  "customerId": "geojacob",
  "billingType": "ONE_TIME",
  "recurrenceUnit": null,
  "recurrenceType": null
}

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Body

application/json
planIdentifier
string
required

The identifier of the plan being purchased as a one-time payment.

Example:

"lifetime-access"

chargePeriod
enum<string>
required

Must be ONE_TIME. Any other value is rejected.

Available options:
ONE_TIME
Example:

"ONE_TIME"

customerId
string
required

The ID of the customer being charged. The customer must already have a default payment method on file.

Example:

"cust_789"

features
object[] | null

A list of features and their desired quantities.

Example:
[{ "identifier": "seats", "quantity": 5 }]
currencyCode
string | null

Optional ISO 4217 currency code to charge in. Must match the customer's currency if they already have one set.

Example:

"USD"

ipAddress
string | null

The IP Address of the customer, used for location-based pricing.

Example:

"103.154.35.20"

Response

Charge created

id
string<uuid>

The unique identifier of the created charge record.

Example:

"7c2f3a91-2d4e-4a8b-9b1c-6f0a2e5d9c11"

startDate
string<date>

The date the one-time payment was created.

Example:

"2026-06-20"

endDate
string<date> | null

Always null for one-time payments.

Example:

null

billingPeriodStartTime
string<date-time> | null

Not applicable for one-time payments.

Example:

null

billingPeriodEndTime
string<date-time> | null

Not applicable for one-time payments.

Example:

null

amount
string

The amount charged.

Example:

"49.00"

recurrence
string

Empty for one-time payments.

Example:

""

currency
string

The currency of the payment.

Example:

"USD"

status
string

The status of the resulting record.

Example:

"active"

product
object
plan
object
features
any[]

List of features included in the purchase.

trialDaysRemaining
integer

Always 0 for one-time payments.

Example:

0

customerId
string

The customer identifier associated with this payment.

Example:

"geojacob"

billingType
string

The billing type of the record.

Example:

"ONE_TIME"