Skip to content

{Handler Name} Payment Handler

  • Handler Name: {reverse-dns.name}
  • Version: {YYYY-MM-DD}

{Brief description of what this handler enables and the payment flow it supports.}

  • {Benefit 1}
  • {Benefit 2}
  • {Benefit 3}
ParticipantIntegration Section
BusinessBusiness Integration
PlatformPlatform Integration

{Describe all participants in this handler and their roles.}

Note on Terminology: While this specification refers to the participant as the “business,” technical schema fields may retain the standard industry nomenclature merchant_* (e.g., merchant_id). Mappings are documented below.

ParticipantRolePrerequisites
Business{role description}{Yes/No — brief description}
Platform{role description}{Yes/No — brief description}
{Other Participant}{role description}{Yes/No — brief description}

{Optional: ASCII diagram showing participant relationships}

+---------+ +---------------+ +------------+
|Platform | | {Provider} | | Business |
+----+----+ +-------+-------+ +------+-----+
| | |
| {step 1} | |
|----------------->| |
| | |
| {step 2} | |
|<-----------------| |
| | |
| {step 3} |
|-------------------------------------->|

Before advertising this handler, businesses MUST complete:

  1. {Prerequisite 1, e.g., “Register with {provider} to obtain a business identifier”}
  2. {Prerequisite 2}

Prerequisites Output:

FieldDescription
identity.access_token{what identifier is assigned, e.g., business_id}
{additional config}{any additional configuration from onboarding}

Businesses advertise support for this handler in their UCP profile’s payment_handlers registry.

Schema URL: {schema_url}

The handler schema defines three config variants for different contexts. See Payment Handler Guide: Defining the Schema for the full pattern.

Config VariantContextPurpose
business_configBusiness discovery{describe business-specific fields}
platform_configPlatform discovery{describe platform-specific fields}
response_configCheckout responses{describe runtime fields}
FieldTypeRequiredDescription
{field}{type}{Yes/No}{description}
FieldTypeRequiredDescription
{field}{type}{Yes/No}{description}
{
"ucp": {
"version": "2026-01-11",
"payment_handlers": {
"{handler_name}": [
{
"id": "{handler_id}",
"version": "{version}",
"spec": "{spec_url}",
"schema": "{schema_url}",
"available_instruments": [
{
"type": "{instrument_type}",
"constraints": {
// Type-specific constraints
}
}
],
"config": {
// Handler-specific configuration
}
}
]
}
}
}

Upon receiving a payment with this handler’s instrument, businesses MUST:

  1. Validate Handler: Confirm instrument.handler_id matches an advertised handler.
  2. Ensure Idempotency: If the request is a retry (matches a previous checkout_id or idempotency key), return the previous result immediately without re-processing funds.
  3. {Step 3}: {description}
  4. {Step 4}: {description}
  5. Return Response: Respond with the finalized checkout state.

{Include example request/response if the business calls an external service}


Before using this handler, Platforms MUST complete:

  1. {Prerequisite 1, e.g., “Register with {provider} to obtain a Platform identifier”}
  2. {Prerequisite 2}

Prerequisites Output:

FieldDescription
identity.access_token{what identifier is assigned}
{additional config}{any additional configuration from onboarding}

Platforms advertise support for this handler in their UCP profile’s payment_handlers registry using platform_config.

FieldTypeRequiredDescription
{field}{type}{Yes/No}{description}
{
"ucp": {
"version": "2026-01-11",
"payment_handlers": {
"{handler_name}": [
{
"id": "{handler_id}",
"version": "{version}",
"spec": "{spec_url}",
"schema": "{schema_url}",
"available_instruments": [
{
"type": "{instrument_type}",
"constraints": {
// Type-specific constraints the platform supports
}
}
],
"config": {
// Platform-specific configuration
}
}
]
}
}
}

Platforms MUST follow this flow to acquire a payment instrument:

The Platform identifies {handler_name} in the business’s UCP profile payment_handlers registry (from /.well-known/ucp).

{Description of what the Platform does in this step.}

The Platform submits the checkout with the constructed payment instrument.

POST /checkout-sessions/{checkout_id}/complete
Content-Type: application/json
{
"payment": {
"instruments": [
{
"id": "{instrument_id}",
"handler_id": "{handler_id}",
"type": "{instrument_type}",
"credential": {
"type": "{credential_type}"
}
}
]
}
}

RequirementDescription
Binding requiredCredentials MUST be bound to checkout_id and identity to prevent reuse.
Binding placementBinding data (e.g., checkout_id) SHOULD be included within the credential payload to ensure it is covered by the signature, rather than in transport headers.
Binding verifiedThe processing participant MUST verify binding matches before processing.
Token Expiry{If using tokens: Tokens MUST expire after {duration} or single-use.}
Data Residency{Specify if PII MUST be processed/stored in specific geographic regions (e.g., EU, US) to comply with local laws.}
{Additional requirement}{description}

  • Handler Spec: {spec_url}
  • Handler Schema: {schema_url} (defines config, instrument, and credential shapes)