Overview
This guide walks you through accepting payments using Fossapay’s Collections API. You’ll learn how to create virtual accounts, receive payments, handle webhooks, and reconcile transactions.Quick Start
1
Create a Virtual Account
Generate a unique account number for your customer
2
Share Account Details
Provide the account number to your customer
3
Receive Payment
Customer transfers money to the virtual account
4
Get Notified
Receive instant webhook notification
5
Credit Customer
Update your customer’s balance or fulfill their order
Creating Virtual Accounts
For Wallet Top-ups
For Invoice Payments
Displaying Account Details
Email Template
In-App Display (React)
Handling Webhook Notifications
Set Up Webhook Endpoint
Webhook Payload Example
Querying Transaction Status
Get Transaction by ID
List Virtual Account Transactions
Reconciliation
Daily Reconciliation
Handling Edge Cases
Overpayment
Underpayment
Duplicate Payments
Best Practices
Always Use Metadata
Always Use Metadata
Store relevant information in metadata for easy tracking:
Set Expiry for Temporary Accounts
Set Expiry for Temporary Accounts
Always set expiry dates for invoice payments:
Verify Webhook Signatures
Verify Webhook Signatures
Never process webhooks without signature verification.
Handle Webhooks Idempotently
Handle Webhooks Idempotently
Always check for duplicates using transaction_id or event_id.
Send Confirmations
Send Confirmations
Always notify customers when payments are received.