TESTNET-10 · PROVIDER PORTAL
Bring your service to Kaspa.
Sign in to create an integration, enroll your service, and manage offers.
Email is an unverified login name; password recovery is not available.
PROVIDER WORKSPACE
Set up and manage your service.
Start with an integration credential, then connect the provider plugin and complete enrollment.
STEP 01
Create your integration ID
After signing in, create an integration credential for the provider ID you want the setup plugin to manage. You can do this before enrollment. The credential expires after seven days and permits enrollment, offer management, and workload-key management for that provider. Keep the downloaded file private.
STEP 02
Install the provider plugin
Download the Kaspa Provider Setup plugin to guide you through service enrollment and offer management.
Install the downloaded plugin in a supported AI agent app, such as ChatGPT or Claude where compatible. When it asks for your integration credential, provide the location of the complete file you created above. The plugin reads its token and uses it to guide you through onboarding.
INTEGRATION CONTRACT · TESTNET-10
Connect your service to the Payment Server
Your service handles the customer's request and returns the result directly to the client. The Payment Server (PS) confirms payment, issues a grant, and tracks how many paid uses remain.
One-time prerequisite: prove service ownership and publish an offer
Serve the enrollment challenge token as the exact plain-text response at /.well-known/kaspa-ps-verification on your service origin. Complete the Testnet-10 enrollment payment from your declared payout address. After activation, publish each offer with an operation ID, display name, provider price in sompi, a request parameter name (typeField), and its allowed types. You may specify a service path; otherwise the client uses /v1/work. Your service must accept HTTPS requests at the published path.
1. Receive a paid request
After PS settles the customer's invoice, the client calls your service with the opaque grant in Authorization: Bearer [grant]. The JSON body contains the operation ID, selected payload, request hash, and a stable idempotency key:
{"operationId":"color-picker","payload":{"type":"reds"},"requestHash":"[64-character SHA-256 hex]","idempotencyKey":"[stable operation key]"}
Calculate requestHash as SHA-256 of the canonical JSON object containing operationId and payload (object keys sorted recursively). Reject a mismatched hash or unsupported selection. Keep the same operation key and saved result for retries; never execute a changed request under an existing key.
operationId + selected payload→canonical JSON → SHA-256→requestHashSame selection, same hashrequestHash binds the selected request; it is not a payment credential. The separate operation key identifies one execution and its retries.
2. Reserve usage before work
Your backend authenticates every PS usage call with its separate workload key in the Bearer header. Call POST /v1/usage/reserve with providerId, grantHandle, operationId, requestHash, operationKey (the client's idempotency key), and payload. PS checks that the settled grant belongs to your provider and offer, has an available use, and matches the request. The response gives a reservationId, status, and replayed flag. An exact retry returns the existing reservation; a changed request under the same operation key conflicts.
3. Reconcile what happened
After reserving, your service durably records whether it executed the work and, if successful, the result. Then call POST /v1/usage/reconcile with providerId, operationKey, workState, and, for a saved result, workReference. This endpoint records your evidence against the reservation and checks for conflicts with earlier evidence or a finalized outcome. It does not execute your work, verify the result itself, or finalize the paid use.
workState | Meaning and next step |
|---|---|
result_persisted | The result is durably saved. Supply a stable workReference; if reviewRequired is false, commit the use. |
absent | You know no billable work occurred. If reviewRequired is false, release the reservation. |
executing or unknown | The outcome is uncertain. PS flags it for review; do not commit, release, or rerun the work speculatively. |
The response includes the reservation status and reviewRequired. A conflict or uncertain state keeps the use blocked until reconciliation review resolves it.
workReference?It is a stable ID for the result in your own storage. The sample service uses the operation key. PS compares this ID across reconciliation and commit; it does not fetch the result. It is not a hash of the result or proof that the customer received it.4. Commit or release
For saved, billable work, call POST /v1/usage/commit with providerId, reservationId, operationKey, and the same workReference. For known absent work, call POST /v1/usage/release with the same identifiers and a stable workReference. PS requires matching reconciliation evidence before either action. Exact retries are idempotent; a conflicting outcome is rejected. Release restores a pack unit for another query, while a single-use grant remains bound to its original operation.
- 1 · ReserveYour service asks PS to reserve one use for this operation key. A denied request stops here.
- 2 · WorkYour service executes once and saves the result under a stable work reference.
- 3 · ReconcileYour service reports what it knows happened. PS checks for conflicting evidence and may require review.
result_persisted → commit → return the saved result to the clientabsent → release → return an error or no service resultexecuting / unknown → review; do not claim success or releaseThe successful path returns a result only after PS confirms the commit. If execution fails or the outcome is uncertain, keep the reservation for recovery or review; release it only when you know no billable work occurred. The sample service does not automatically release reservations on execution failure. PS does not receive the result or proof that the customer received the response.
Credential and data boundaries
The integration credential manages your account; the workload key authenticates your backend; the grant authorizes a customer's paid use. Keep them separate. Send PS only the minimum usage fields above, not customer identity, request body beyond the selected payload, or service results. Disabling an offer stops new purchases. Disabling the provider also blocks workload authentication and may interrupt existing purchases.
Enroll a provider
Create an enrollment, then complete service proof and payment in either order. Serve the challenge token as plain text at the verification URL. Send exactly 1 test KAS from the declared payout address to the displayed payment recipient. Do not send another payment while verification is pending.
Verification URL
Challenge token (response body)
Payment recipient
Manage provider
Account details
Save the key securely when it appears; it cannot be retrieved again.