Create a payment link
curl --request POST \
--url https://platform.jobbit.uk/v1/billing/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price_id": "price_1Pack500000001"
}
'import requests
url = "https://platform.jobbit.uk/v1/billing/checkout"
payload = { "price_id": "price_1Pack500000001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price_id: 'price_1Pack500000001'})
};
fetch('https://platform.jobbit.uk/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.jobbit.uk/v1/billing/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'price_id' => 'price_1Pack500000001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.jobbit.uk/v1/billing/checkout"
payload := strings.NewReader("{\n \"price_id\": \"price_1Pack500000001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.jobbit.uk/v1/billing/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price_id\": \"price_1Pack500000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/billing/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price_id\": \"price_1Pack500000001\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6",
"session_id": "cs_live_a1B2c3D4e5F6",
"product": {
"name": "500 credits",
"type": "credits",
"credits": 500,
"period_days": null
},
"price": {
"id": "price_1Pack500000001",
"amount": "1.50",
"currency": "USD"
}
}{
"error": {
"code": "price_id_required",
"message": "name the price to pay for",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "unknown_price",
"message": "no plan or credit pack has this price",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "active_subscription",
"message": "the account already has a plan; change it on the subscription page",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_request",
"message": "the request is not valid",
"details": [
{
"location": [
"body",
"name"
],
"message": "String should match pattern '^[a-z0-9][a-z0-9-]*$'",
"type": "string_pattern_mismatch"
}
],
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Create a payment link
Creates a Stripe payment page for a plan or a credit pack. Nothing is charged by the call: the person opens the link, pays on Stripe, and the plan or credits are granted once the payment succeeds. An account that already has a plan cannot buy another through this route.
Requires the billing:write permission.
POST
/
v1
/
billing
/
checkout
Create a payment link
curl --request POST \
--url https://platform.jobbit.uk/v1/billing/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price_id": "price_1Pack500000001"
}
'import requests
url = "https://platform.jobbit.uk/v1/billing/checkout"
payload = { "price_id": "price_1Pack500000001" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price_id: 'price_1Pack500000001'})
};
fetch('https://platform.jobbit.uk/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.jobbit.uk/v1/billing/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'price_id' => 'price_1Pack500000001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.jobbit.uk/v1/billing/checkout"
payload := strings.NewReader("{\n \"price_id\": \"price_1Pack500000001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.jobbit.uk/v1/billing/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price_id\": \"price_1Pack500000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/billing/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price_id\": \"price_1Pack500000001\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6",
"session_id": "cs_live_a1B2c3D4e5F6",
"product": {
"name": "500 credits",
"type": "credits",
"credits": 500,
"period_days": null
},
"price": {
"id": "price_1Pack500000001",
"amount": "1.50",
"currency": "USD"
}
}{
"error": {
"code": "price_id_required",
"message": "name the price to pay for",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "unknown_price",
"message": "no plan or credit pack has this price",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "active_subscription",
"message": "the account already has a plan; change it on the subscription page",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_request",
"message": "the request is not valid",
"details": [
{
"location": [
"body",
"name"
],
"message": "String should match pattern '^[a-z0-9][a-z0-9-]*$'",
"type": "string_pattern_mismatch"
}
],
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…
Body
application/json
A Stripe price id from GET /v1/billing/products.
Required string length:
1 - 200⌘I