Vaults

Perform an operation advertised by a vault item

Changed on

Retrieve the item first and invoke only an operation listed in available_operations, following its natural-language description. Availability is rechecked at execution time; unavailable operations return 409. Authorization and preparation may call an external provider and return updated state. Link cards advertise authorize; pass browser_id and page_url from the final checkout page so Kernel can inspect the checkout. Eligible unused AgentCard cards advertise prepare_checkout, which requires checkout context and obtains device approval before native Square Pay. Keep the returned approval page open, poll until ready_to_submit, then submit before preparation.expires_at. Unused preparations expire automatically and cannot be reused. If spend-request creation is rejected with a non-retryable provider error, the card item is deleted and the provider's error code and message are returned. Rate limits return HTTP 429 and retain the card item; stop, back off, and retry the same authorize operation.

Ready Kernel cards advertise fill. Fill delivers card details for a few minutes; submit checkout promptly after filling. A repeated fill is safe.

Fill returns a value-free execution result. Validation failures before writing return 400 (invalid request or targets), 403 (access or destination denied), 404 (resource not found), or 409 (item or browser not ready). Once writing starts, known partial failures and indeterminate field outcomes return 200 with status failed or unknown. Fill never submits the page, so it is safe to retry after a failure, an unknown outcome, or a transport error.

Connected Kernel wallets may advertise add_payment_method, which returns a single-use hosted card_enrollment link for a card, and remove_payment_method, which removes one card without affecting the others. Both operations require vaults:write in addition to vaults:use on the vault for scoped API keys, and return 403 without both permissions.

post/vaults/{id_or_name}/items/{key}/operations

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/vaults/{id_or_name}/items/{key}/operations
  • Auth
    HTTP bearer

Path parameters

id_or_namestring required
keystring required

Request body

OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR

Example request

{
  "browser_id": "browser-session-id",
  "fields": [
    {
      "field": "number",
      "selector": "#card-number"
    },
    {
      "field": "exp_month",
      "selector": "#expiry-month"
    },
    {
      "field": "exp_year",
      "selector": "#expiry-year"
    },
    {
      "field": "cvc",
      "selector": "#security-code"
    }
  ],
  "page_url": "https://shop.example/checkout",
  "type": "fill"
}

Response

Authorization or preparation completed or resumed, or fill execution outcomes returned

OR
OR
OR
OR
OR
OR

Changes

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • breaking

      added to the //////// response property oneOf list for the response status

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      added shop_pay discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay_oauth discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay_oauth discriminator mapping keys to the //////// response property for the response status

    • info

      added shop_pay_oauth discriminator mapping keys to the //////// response property for the response status

    • info

      added the optional property //////////////// to the response with the status