Skip to content
agentsub
Esc
↑↓navigate↵open⌘Jpreview

Link OAuth callback (POST)

POST/v1/payments/link/callback
Authorization
AuthorizationBearer token (JWT) · headerrequired

Clerk human owner session JWT; iss must equal the configured Clerk issuer and the identity must be a human (not agent) owner with a verified email.

or
AuthorizationOAuth2 access token · headerrequired
Scopes:agentsub:owner
Request body
requiredapplication/json
codestringrequired
min length 1 · max length 4096
statestringrequired
min length 1 · max length 200
Responses
200

Link connection result

object
400

invalid_input

codestringrequired
Allowed:owner_requiredagent_mismatchidempotency_requiredinvalid_inputstripe_signature_requiredpayment_unavailable
statusintegerrequired
403

owner_required

codestringrequired
Allowed:owner_requiredagent_mismatchidempotency_requiredinvalid_inputstripe_signature_requiredpayment_unavailable
statusintegerrequired
503

payment_unavailable

codestringrequired
Allowed:owner_requiredagent_mismatchidempotency_requiredinvalid_inputstripe_signature_requiredpayment_unavailable
statusintegerrequired
Request
curl -X POST 'https://api.agentsub.dev/v1/payments/link/callback' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "string",
  "state": "string"
}'
Response
{}