integrate-payment-gateway

Integrate payment gateway checkout, refund, and webhook flows into e-commerce applications.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/agent-skills --skill integrate-payment-gateway-vesviet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: integrate-payment-gateway
Source: https://github.com/vesviet/agent-skills/tree/main/core/skills/commerce/integrate-payment-gateway
Command: npx skills add https://github.com/vesviet/agent-skills --skill integrate-payment-gateway-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Connecting an application to a payment provider involves PCI-DSS compliance risks, webhook signature verification, idempotency handling, and error mapping that are easy to get wrong, leading to double-billing, replay attacks, or leaked card data. ## Core Features & Use Cases - Secure Payment Flows: Implements checkout, capture, refund, and webhook handling using official provider SDKs (Stripe, VNPay, PayPal, Momo) with idempotency keys and tokenized card references. - Webhook Hardening: Enforces HMAC signature verification with constant-time comparison, queue-first ingestion, and dual-write idempotency guards against duplicate events. - Modern Payment Paradigms: Covers dynamic payment methods, BNPL messaging, A2A pay-by-bank settlement states, and HTTP 402/MPP programmatic agent checkout. - Use Case: When adding Stripe checkout to an e-commerce app, use this Skill to scaffold the payment intent flow, verify webhooks, map provider errors to safe user messages, and validate the integration in sandbox mode. ## Quick Start Use the integrate-payment-gateway skill to add a Stripe checkout and webhook flow with idempotency handling to this application.

Frequently Asked Questions about integrate-payment-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Stripe checkout into an e-commerce application?▼

Install the official Stripe SDK, create a payment intent with amount and currency, confirm via the client SDK, and handle the webhook to update order status. Enable automatic_payment_methods so the UI renders available methods dynamically.

How do I verify payment webhook signatures securely?▼

Compute an HMAC over the raw, unparsed request payload and compare it with constant-time comparison such as crypto.timingSafeEqual or hmac.compare_digest. Reject events with timestamps older than 300 seconds to block replay attacks.

How do I prevent double-billing in payment processing?▼

Use a unique idempotency key (UUID per transaction attempt) for every charge or capture call. For webhooks, add a unique database index on provider, event_id, and event_type plus a distributed lock during event processing.

Which payment providers does this integration approach support?▼

The approach covers Stripe, VNPay, PayPal, Momo, and similar providers, always using the official SDK rather than hand-rolled HTTP calls. It also covers A2A pay-by-bank rails such as TrueLayer, Plaid, or Stripe Pay by Bank.

Can AI agents make programmatic payments without interactive checkout?▼

Yes, via HTTP 402 Payment Required responses with payment headers, or Stripe Machine Payments Protocol (MPP) and SetupIntents configured with setup_future_usage set to off_session for charging stored methods programmatically.

What card data can be stored or logged in a payment integration?▼

Never log, store, or return raw card numbers, CVV, or full PAN data. Store only tokenized references such as customer_id and payment_method_id, and prefer EMVCo network tokens over raw PAN.