payment-idempotency

Official

Idempotent payments to stop duplicate charges.

Authorvtexdocs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Apply when implementing idempotency logic in payment connector code or handling duplicate payment requests. Covers paymentId as idempotency key, payment state machine transitions, retry semantics for cancellation and refund operations, and requestId handling. Use for preventing duplicate charges and ensuring correct Gateway retry behavior across Create Payment, Cancel, Capture, and Refund endpoints.

Core Features & Use Cases

  • Prevent duplicate charges by enforcing idempotency across payment endpoints using paymentId and requestId
  • Manage a payment state machine to ensure valid transitions across Create Payment, Cancel, Capture, and Refund
  • Support retry semantics for gateway retries within the 7-day window and preserve exact responses for duplicates
  • Example: a connector stores the initial response and reuses it for retry requests to the same paymentId

Quick Start

Configure your payment handlers to check a persistent store for existing paymentId before processing and return the exact stored response on duplicates.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: payment-idempotency
Download link: https://github.com/vtexdocs/ai-skills/archive/main.zip#payment-idempotency

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.