Intégration de paiements SePay et Polar

VérifiéSûr

Intégrez les paiements avec SePay (Vietnam) et Polar (global) : transactions, abonnements, webhooks, QR codes, facturation à l'usage et livraison automatisée des avantages.

Spar Skills Guide Bot
DeveloppementAvancé
27/07/2026
Claude CodeCursorWindsurfCodex
#payments#webhooks#subscriptions#vietqr#saas-billing

Recommandé pour

Synthèse automatique

Fournit des conseils d’implémentation et des scripts de vérification pour intégrer les paiements SePay (VietQR, virements bancaires, webhooks) et la facturation SaaS Polar (abonnements, facturation à l’usage, avantages).

Points forts

  • Couvre à la fois les paiements locaux vietnamiens via SePay et la monétisation SaaS mondiale via Polar.
  • Inclut des scripts de vérification des signatures de webhooks pour les deux plateformes.
  • Organise des guides de référence sur l’authentification, les API, les SDK, les checkouts, les abonnements et les bonnes pratiques.
  • Aborde la conformité fiscale et la livraison automatisée d’avantages comme les licences et les accès GitHub/Discord.

Limites

  • Nécessite des comptes SePay/Polar, des identifiants API et une configuration propre à chaque plateforme.
  • Le SKILL.md sert d’index ; les détails d’implémentation se trouvent dans des fichiers de référence séparés.
  • Ce n’est ni une bibliothèque prête à l’emploi ni un système de facturation complet à lui seul.
Quand l'utiliser

À utiliser lorsqu’il faut concevoir ou implémenter des flux de paiement, des webhooks, des abonnements ou des fonctions de facturation SaaS avec SePay ou Polar.

Quand l'éviter

À éviter pour d’autres fournisseurs de paiement que SePay et Polar, ou lorsqu’il faut un backend de facturation entièrement hébergé sans services externes.

Analyse de sécurité

Sûr
Score qualité86/100

The skill is a documentation/index for payment integrations and does not include destructive commands, secret exfiltration, obfuscated payloads, or instructions to disable safety controls. It references local reference files and webhook helper scripts, but does not instruct executing untrusted remote code.

Points d'attention
  • •References external reference documents and helper scripts that are not included in the provided SKILL.md, so their exact contents cannot be verified from this file alone.
Comment cette analyse est faite

Exemples

Polar subscription checkout
Add an embedded Polar checkout to my Next.js app for a monthly subscription plan, verify the Polar webhook signature, and grant a license key benefit after successful payment.
SePay VietQR payment flow
Implement a SePay bank transfer checkout that generates a VietQR code, then handle the webhook to mark the order as paid and log the transaction.
Usage-based billing
Design a Polar usage-based billing setup with metered credits and automated GitHub repository access benefits, including a customer portal link for plan changes.

name: payment-integration description: Implement payment integrations with SePay (Vietnamese payment gateway with VietQR, bank transfers, cards) and Polar (global SaaS monetization platform with subscriptions, usage-based billing, automated benefits). Use when integrating payment processing, implementing checkout flows, managing subscriptions, handling webhooks, processing bank transfers, generating QR codes, automating benefit delivery, or building billing systems. Supports authentication (API keys, OAuth2), product management, customer portals, tax compliance (Polar as MoR), and comprehensive SDK integrations (Node.js, PHP, Python, Go, Laravel, Next.js). version: 1.0.0 license: MIT

Payment Integration

Implement payment processing with SePay (Vietnamese payments) and Polar (global SaaS monetization).

When to Use

Use when implementing:

  • Payment gateway integration (checkout, processing)
  • Subscription management (trials, upgrades, billing)
  • Webhook handling (payment notifications)
  • QR code payments (VietQR, NAPAS)
  • Usage-based billing (metering, credits)
  • Automated benefit delivery (licenses, GitHub access, Discord roles)
  • Customer portals (self-service management)
  • Bank transfer automation (Vietnamese banks)
  • Product catalogs with pricing

Platform Selection

Choose SePay for:

  • Vietnamese market (VND currency)
  • Bank transfer automation
  • VietQR/NAPAS payments
  • Local payment methods
  • Direct bank account monitoring

Choose Polar for:

  • Global SaaS products
  • Subscription management
  • Usage-based billing
  • Automated benefits (GitHub, Discord, licenses)
  • Merchant of Record (tax compliance)
  • Digital product sales

Quick Reference

SePay Integration

  • Overview & Auth: references/sepay/overview.md - Platform capabilities, API/OAuth2 auth, supported banks
  • API Reference: references/sepay/api.md - Endpoints, transactions, bank accounts, virtual accounts
  • Webhooks: references/sepay/webhooks.md - Setup, payload structure, verification, retry logic
  • SDK Usage: references/sepay/sdk.md - Node.js, PHP, Laravel implementations
  • QR Codes: references/sepay/qr-codes.md - VietQR generation, templates, integration
  • Best Practices: references/sepay/best-practices.md - Security, patterns, monitoring

Polar Integration

  • Overview & Auth: references/polar/overview.md - Platform capabilities, authentication methods, MoR concept
  • Products & Pricing: references/polar/products.md - Product types, pricing models, usage-based billing
  • Checkouts: references/polar/checkouts.md - Checkout flows, embedded checkout, links
  • Subscriptions: references/polar/subscriptions.md - Lifecycle, upgrades, downgrades, trials
  • Webhooks: references/polar/webhooks.md - Event types, signature verification, monitoring
  • Benefits: references/polar/benefits.md - Automated delivery (GitHub, Discord, licenses, files)
  • SDK Usage: references/polar/sdk.md - TypeScript, Python, PHP, Go, framework adapters
  • Best Practices: references/polar/best-practices.md - Security, patterns, monitoring

Integration Scripts

  • SePay Webhook Verification: scripts/sepay-webhook-verify.js - Verify SePay webhook authenticity
  • Polar Webhook Verification: scripts/polar-webhook-verify.js - Verify Polar webhook signatures
  • Checkout Helper: scripts/checkout-helper.js - Generate checkout sessions for both platforms

Implementation Workflow

SePay Implementation

  1. Load references/sepay/overview.md for auth setup
  2. Load references/sepay/api.md or references/sepay/sdk.md for integration
  3. Load references/sepay/webhooks.md for payment notifications
  4. Use scripts/sepay-webhook-verify.js for webhook verification
  5. Load references/sepay/best-practices.md for production readiness

Polar Implementation

  1. Load references/polar/overview.md for auth and concepts
  2. Load references/polar/products.md for product setup
  3. Load references/polar/checkouts.md for payment flows
  4. Load references/polar/webhooks.md for event handling
  5. Use scripts/polar-webhook-verify.js for webhook verification
  6. Load references/polar/benefits.md if automating delivery
  7. Load references/polar/best-practices.md for production readiness

Key Capabilities

SePay:

  • Payment gateway (QR, bank transfer, cards)
  • Bank account monitoring with webhooks
  • Order-based virtual accounts
  • VietQR generation API
  • 44+ Vietnamese banks supported
  • Rate limit: 2 calls/second

Polar:

  • Merchant of Record (global tax compliance)
  • Subscription lifecycle management
  • Usage-based billing (events, meters)
  • Automated benefits (GitHub, Discord, licenses)
  • Customer portal (self-service)
  • Multi-language SDKs
  • Rate limit: 300 req/min

Instructions

When implementing payment integration:

  1. Identify platform based on requirements (Vietnamese vs global, payment types)
  2. Load relevant references progressively as needed
  3. Implement authentication using platform-specific methods
  4. Set up products/pricing according to business model
  5. Implement checkout flow (hosted, embedded, or API-driven)
  6. Configure webhooks with proper verification
  7. Handle payment events (success, failure, refund)
  8. Test thoroughly in sandbox before production
  9. Monitor and optimize using platform analytics

Load only the references needed for current implementation step to maintain context efficiency.

Task Planning Notes

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/payment-integration-with-sepay-and-polar-ms2s7ciz/download' --output '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md.part' && mv '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md.part' '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Extrait original : Quick Reference

SePay Integration

  • Overview & Auth: references/sepay/overview.md - Platform capabilities, API/OAuth2 auth, supported banks
  • API Reference: references/sepay/api.md - Endpoints, transactions, bank accounts, virtual accounts
  • Webhooks: references/sepay/webhooks.md - Setup, payload structure, verification, retry logic
  • SDK Usage: references/sepay/sdk.md - Node.js, PHP, Laravel implementations
  • QR Codes: references/sepay/qr-codes.md - VietQR generation, templates, integration
  • Best Practices: references/sepay/best-practices.md - Security, patterns, monitoring

Polar Integration

  • Overview & Auth: references/polar/overview.md - Platform capabilities, authentication methods, MoR concept
  • Products & Pricing: references/polar/products.md - Product types, pricing models, usage-based billing
  • Checkouts: references/polar/checkouts.md - Checkout flows, embedded checkout, links
  • Subscriptions: references/polar/subscriptions.md - Lifecycle, upgrades, downgrades, trials
  • Webhooks: references/polar/webhooks.md - Event types, signature verification, monitoring
  • Benefits: references/polar/benefits.md - Automated delivery (GitHub, Discord, licenses, files)
  • SDK Usage: references/polar/sdk.md - TypeScript, Python, PHP, Go, framework adapters
  • Best Practices: references/polar/best-practices.md - Security, patterns, monitoring

Integration Scripts

  • SePay Webhook Verification: scripts/sepay-webhook-verify.js - Verify SePay webhook authenticity
  • Polar Webhook Verification: scripts/polar-webhook-verify.js - Verify Polar webhook signatures
  • Checkout Helper: scripts/checkout-helper.js - Generate checkout sessions for both platforms

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && test -s '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/payment-integration' && cp -R '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz' '.claude/skills/payment-integration'

Cursor
test -f '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && test -s '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/payment-integration' && cp -R '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz' '.cursor/skills/payment-integration'

Codex
test -f '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && test -s '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/payment-integration' && cp -R '.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz' '.agents/skills/payment-integration'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz'

openskills read 'payment-integration-with-sepay-and-polar-ms2s7ciz'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/payment-integration-with-sepay-and-polar-ms2s7ciz/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires