Skip to content

Agent: Payments

Payout (Stripe Connect) status

GET /api/v1/agent/payments/

Requires payments: view. charges_enabled is what lets a paid course sell. When not yet true, next_action says how to get there.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X GET "https://www-dev.yoshuko.com/api/v1/agent/payments/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/payments/"
response = requests.get(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/payments/`, {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
Status Meaning
200 No response body
401 Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified).
403 The key's scope for this resource does not allow the action.
429 Rate limited (300 requests/hour per key). Retry after the Retry-After header.

POST /api/v1/agent/payments/onboarding-link/

Requires payments: edit. Creates or reuses the organization's Connect account and returns onboarding_url. A person must open it: Stripe collects identity and bank details itself. Poll GET /api/v1/agent/payments/ until charges_enabled. 403 free_courses_only for an alpha place.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/payments/onboarding-link/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/payments/onboarding-link/"
response = requests.post(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/payments/onboarding-link/`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
Status Meaning
200 No response body
201 No response body
401 Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified).
403 The key's scope for this resource does not allow the action.
429 Rate limited (300 requests/hour per key). Retry after the Retry-After header.
503 No response body

Create or run a storage purchase (returns a payment link for a person)

POST /api/v1/agent/storage/checkout/

Requires payments: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/storage/checkout/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/storage/checkout/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/storage/checkout/"
response = requests.post(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/storage/checkout/`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
Status Meaning
200 No response body
201 No response body
204 No response body
400 No response body
401 Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified).
403 The key's scope for this resource does not allow the action.
404 No such object in this key's organisation.
429 Rate limited (300 requests/hour per key). Retry after the Retry-After header.