Skip to main content
POST
/
v1
/
checkout
Create Checkout
curl --request POST \
  --url https://api.agentpowers.ai/v1/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "skill_slug": "<string>",
  "success_url": "https://agentpowers.ai/purchase/success",
  "cancel_url": "https://agentpowers.ai/purchase/cancel"
}
'
import requests

url = "https://api.agentpowers.ai/v1/checkout"

payload = {
"skill_slug": "<string>",
"success_url": "https://agentpowers.ai/purchase/success",
"cancel_url": "https://agentpowers.ai/purchase/cancel"
}
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({
skill_slug: '<string>',
success_url: 'https://agentpowers.ai/purchase/success',
cancel_url: 'https://agentpowers.ai/purchase/cancel'
})
};

fetch('https://api.agentpowers.ai/v1/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "purchase_id": "<string>",
  "checkout_url": "<string>",
  "status": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Provide a Clerk JWT or a long-lived CLI token (prefix ap_cli_). Pass as Authorization: Bearer <token>.

Body

application/json
skill_slug
string
required
Required string length: 3 - 60
success_url
string
default:https://agentpowers.ai/purchase/success
Maximum string length: 500
cancel_url
string
default:https://agentpowers.ai/purchase/cancel
Maximum string length: 500

Response

Successful Response

purchase_id
string
required
checkout_url
string
required
status
string
required