payuni

Original🇨🇳 Chinese
Translated

Provides an overview of PAYUNi integration and guides users to relevant skills. This is applicable when starting PAYUNi integration, setting up the environment, or requiring general guidance on PAYUNi (unified payment service).

1installs
Added on

NPX Install

npx skill4agent add paid-tw/skills payuni

SKILL.md Content (Chinese)

View Translation Comparison →

PAYUNi Unified Payment Integration Guide

Your task is to help users set up their PAYUNi environment and guide them to the appropriate integration features.

User Demand Analysis

User input:
$ARGUMENTS
Based on user requirements, determine the next steps:
  • If it includes "integration", "checkout", "create transaction", "UPP" → Guide to use
    /payuni-checkout
  • If it includes "query", "order status" → Guide to use
    /payuni-query
  • If it includes "webhook", "callback", "notification" → Guide to use
    /payuni-webhook
  • If no specific designation → Provide the following environment setup guidance

Environment Setup Check

Ask users the following questions:
  1. Project Framework: What framework are you using?
    • PHP (Laravel / Native PHP / Others)
    • Node.js (Express / Next.js / NestJS / Others)
    • Python (Django / Flask / FastAPI / Others)
    • Others
  2. Environment Status: Do you already have a PAYUNi merchant account?
    • Yes, already have a test environment account
    • Yes, already have a production environment account
    • No, need to apply

Environment Variable Setup

Guide users to create environment variables:
bash
PAYUNI_MERCHANT_ID=Your Merchant ID
PAYUNI_HASH_KEY=Your HashKey
PAYUNI_HASH_IV=Your HashIV
PAYUNI_TEST_MODE=true  # Test mode, set to false for production environment
Guidance for users:
  1. Create or edit the
    .env
    file in the project root directory
  2. Add the above environment variables
  3. Ensure
    .env
    is added to
    .gitignore

Next Steps

After completing the environment setup, guide users based on their needs:
RequirementSkillDescription
Create payment page
/payuni-checkout
UPP front-end payment integration
Query transaction status
/payuni-query
Transaction query API
Process Webhook
/payuni-webhook
Receive payment notifications

Environment Information

EnvironmentAPI Base URL
Test
https://sandbox-api.payuni.com.tw
Production
https://api.payuni.com.tw

Supported Payment Methods

  • Credit Card: One-time payment, installment payment
  • Mobile Payment: LINE Pay, Apple Pay, Google Pay
  • ATM: WebATM, ATM transfer
  • Convenience Store: Code payment, barcode payment

Important Notes

  1. HashKey and HashIV must be kept confidential and must not be exposed to the front-end
  2. PAYUNi uses AES-256-CBC encryption
  3. Order numbers cannot be duplicated
  4. NotifyURL/ReturnURL must use HTTPS (production environment)
  5. Webhook signatures need to be verified to prevent forgery

Comparison with Other Payment Gateways

FeaturePAYUNiNewebPayEcpay
Encryption MethodAES-256-CBCAES-256-CBCAES-128-CBC
Signature MethodSHA256 (HashInfo)SHA256 (TradeSha)SHA256 (CheckMacValue)
API VersionUnified versionVersion parameterVersion parameter