{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shopify.dev/ucp/shop-pay-handler/2026-08-25/shop_token.json",
  "title": "Shop Token Credential",
  "description": "Credential structure for Shop Pay. A Shop token is an opaque `token`: either a wallet token issued to the platform through identity linking, or the purchase credential the Shop Pay Element returned for one checkout after the buyer confirmed \u2014 one token for each checkout, redeemed once by its merchant. The token is request-only (`ucp_response: omit`); a returned credential carries `type`, plus `approval_id` when one applies, and never `token`.",
  "allOf": [
    {
      "$ref": "https://ucp.dev/2026-08-25/schemas/common/types/payment_credential.json"
    }
  ],
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "const": "shop_token",
      "description": "The credential type for Shop Pay tokens."
    },
    "token": {
      "type": "string",
      "description": "The Shop Pay token. From identity linking, a wallet token the platform reuses across checkouts. From the Shop Pay Element, the purchase credential the element committed for this checkout, and for no other: the merchant redeems it once, within 30 minutes of the buyer's confirmation, after Shop Pay verifies the checkout it was confirmed for (id, currency, destination, total, and instrument). Request-only; never returned in responses.",
      "ucp_response": "omit"
    },
    "approval_id": {
      "type": "string",
      "description": "The Shop Pay payment approval this submission redeems, when the buyer approved the purchase through a Shop payment approval rather than at the finalizer. Returned on approval responses; sent on `complete`."
    }
  }
}
