Paidy · Schema

Token

A Paidy recurring payment token used for subscription billing.

Buy Now Pay LaterBNPLPaymentsJapanCheckoutDeferred PaymentsRecurring PaymentsTokens

Properties

Name Type Description
id string Unique token ID (begins with tok_)
merchant_id string Paidy-assigned merchant ID (begins with mer_)
wallet_id string Merchant wallet grouping identifier; defaults to 'default'
status string Current token status
origin object
description string Merchant-provided token description
kind string Token type; always 'recurring'
metadata object
consumer_id string Paidy-generated consumer ID (begins with con_)
suspensions array History of suspensions
test boolean True if this is a test token
version_nr number Increments with each update
created_at string
updated_at string
activated_at string
deleted_at stringnull Timestamp when deleted; null if still active or suspended
View JSON Schema on GitHub

JSON Schema

token.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/paidy/main/json-schema/token.json",
  "title": "Token",
  "description": "A Paidy recurring payment token used for subscription billing.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique token ID (begins with tok_)",
      "pattern": "^tok_",
      "example": "tok_example123456"
    },
    "merchant_id": {
      "type": "string",
      "description": "Paidy-assigned merchant ID (begins with mer_)",
      "pattern": "^mer_"
    },
    "wallet_id": {
      "type": "string",
      "description": "Merchant wallet grouping identifier; defaults to 'default'",
      "default": "default"
    },
    "status": {
      "type": "string",
      "description": "Current token status",
      "enum": ["active", "suspended", "deleted"]
    },
    "origin": {
      "$ref": "#/$defs/ConsumerOrigin"
    },
    "description": {
      "type": "string",
      "description": "Merchant-provided token description"
    },
    "kind": {
      "type": "string",
      "description": "Token type; always 'recurring'",
      "enum": ["recurring"]
    },
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "consumer_id": {
      "type": "string",
      "description": "Paidy-generated consumer ID (begins with con_)",
      "pattern": "^con_"
    },
    "suspensions": {
      "type": "array",
      "description": "History of suspensions",
      "items": {
        "$ref": "#/$defs/Suspension"
      }
    },
    "test": {
      "type": "boolean",
      "description": "True if this is a test token"
    },
    "version_nr": {
      "type": "number",
      "description": "Increments with each update"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "activated_at": {
      "type": "string",
      "format": "date-time"
    },
    "deleted_at": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "Timestamp when deleted; null if still active or suspended"
    }
  },
  "$defs": {
    "ConsumerOrigin": {
      "type": "object",
      "description": "Consumer information captured at token creation",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string", "format": "email"},
        "phone": {"type": "string"},
        "address": {"$ref": "#/$defs/Address"}
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "line1": {"type": "string"},
        "line2": {"type": "string"},
        "city": {"type": "string"},
        "state": {"type": "string"},
        "zip": {"type": "string"}
      }
    },
    "Suspension": {
      "type": "object",
      "description": "A suspension event record",
      "properties": {
        "created_at": {"type": "string", "format": "date-time"},
        "authority": {"type": "string", "description": "Entity that performed the suspension"}
      }
    },
    "Metadata": {
      "type": "object",
      "description": "Key-value map for arbitrary data; max 20 keys",
      "additionalProperties": {"type": "string"},
      "maxProperties": 20
    }
  }
}