Skip to content

Latest commit

 

History

History
111 lines (87 loc) · 4.96 KB

File metadata and controls

111 lines (87 loc) · 4.96 KB

Documentation Index

Welcome to the Zai Payment Ruby gem documentation. This guide will help you find the information you need.

📖 Getting Started

New to the gem? Start here:

  1. Main README - Installation and basic configuration
  2. Authentication Guide - Get tokens with two approaches (short & long way)
  3. Webhook Quick Start - Set up secure webhooks in 5 minutes
  4. Webhook Examples - Complete usage examples

🏗️ Architecture & Design

  • architecture.md - System architecture and design principles
  • authentication.md - OAuth2 implementation, token management, two approaches
  • users.md - User management for payin (buyers) and payout (sellers/merchants)
  • items.md - Item management for transactions and payments
  • token_auths.md - Token generation for secure bank and card data collection
  • webhooks.md - Webhook implementation details, best practices, and patterns

🔐 Security Guides

📝 Examples

  • User Examples - User management examples and patterns
  • Item Examples - Transaction and payment workflows
  • Token Auth Examples - Token generation and PromisePay.js integration
  • Webhook Examples - Comprehensive webhook usage examples including:
    • Basic CRUD operations
    • Rails controller implementation
    • Sinatra example
    • Rack middleware
    • Background job processing
    • Idempotency patterns

🔗 Quick Links

Authentication

  • Getting Started: Authentication Guide
  • Short Way: ZaiPayment.token (one-liner)
  • Long Way: TokenProvider.new(config: config).bearer_token (full control)

Users

Items

Token Auth

Webhooks

External Resources

📚 Documentation Structure

docs/
├── readme.md                        # This file - documentation index
├── authentication.md                # OAuth2 authentication guide
├── users.md                         # User management guide
├── items.md                         # Item management guide
├── token_auths.md                   # Token generation guide (NEW!)
├── architecture.md                  # System architecture
├── webhooks.md                      # Webhook technical docs
├── webhook_security_quickstart.md   # Quick security setup
└── webhook_signature.md             # Signature implementation

examples/
├── users.md                         # User management examples
├── items.md                         # Item examples
├── token_auths.md                   # Token auth examples (NEW!)
└── webhooks.md                      # Webhook examples

💡 Tips

🆘 Need Help?

  1. Check the relevant documentation section above
  2. Review the examples
  3. Consult the Zai API documentation
  4. Open an issue on GitHub