Payment APIs Documentation
Comprehensive API documentation for integrating payment processing into your applications.
Overview
The FinvyPay Payment API provides a unified interface for processing payments across multiple payment methods, including card payments, alternative payment methods (APM), crypto payments, payouts, and payment links.
Secure & Compliant
Bank-level encryption and PCI-DSS compliant infrastructure to protect your transactions.
Fast Processing
Real-time transaction processing with optimized infrastructure for instant responses.
Global Support
Multi-currency support and international payment methods for global reach.
API Key Authentication
Secure API key-based authentication for all payment endpoints.
Base URL & Environments
All API requests should be made to the following base URL:
Base URL
https://api.finvypay.comThe difference between production and sandbox environments is in the API path:
Production Endpoints
https://api.finvypay.com/api/v1/production/...Sandbox Endpoints (Testing)
https://api.finvypay.com/api/v1/sandbox/...Authentication
All payment API endpoints require authentication using an API key. Include your API key in the Authorization header:
Authorization Header
Authorization: Bearer your_api_key_or_sandbox_api_keyYou can obtain your API keys from your merchant dashboard after completing the onboarding process.
API Versioning
The Payment API uses versioning in the URL path. The current version is v1.
/api/v1/production/card
/api/v1/sandbox/cardRequest & Response Format
Content-Type
All requests must include the Content-Type: application/json header.
Request Body
Request bodies should be JSON-encoded objects.
Response Format
All responses are JSON objects. Successful responses return a 200 OK status code.
Success Response Example
{
"success": true,
"data": {
"transactionId": "TXN-20240101-ABC123",
"status": "SUCCESS",
"amount": 100.50,
"currency": "USD"
}
}Error Handling
The API uses standard HTTP status codes to indicate success or failure:
Error Response Format
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request parameters are invalid",
"details": {
"field": "amount",
"reason": "Amount must be greater than 0"
}
}
}Rate Limits
To ensure fair usage and system stability, API requests are rate-limited:
Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200429 Too Many Requests response. Wait until the reset time before making additional requests.Idempotency
For payment endpoints, you can include an idempotencyKey in the request header to ensure that duplicate requests are not processed multiple times:
Idempotency Header
Idempotency-Key: unique-key-per-requestIf you make the same request (with the same idempotency key) multiple times, only the first request will be processed. Subsequent requests will return the same response as the first request.
Webhooks
Webhooks allow you to receive real-time notifications about transaction status changes. Configure your webhook URL when creating a payment, and we will send POST requests to your endpoint when events occur.
Webhook requests include a signature header for verification:
fs-webhook-hash: HMAC-SHA256 signaturePayment Statuses
Transactions can have the following statuses:
Quick Start
Ready to get started? Here's a quick example of processing a card payment:
Example: Process Card Payment
curl -X POST https://api.finvypay.com/api/v1/sandbox/card \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key_or_sandbox_api_key" \
-d '{
"orderId": "ORD-12345",
"amount": 100.50,
"currency": "USD",
"cardNumber": "4111111111111111",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025,
"cvv": "123",
"cardholderName": "John Doe",
"email": "john@example.com"
}'API Categories
Card Payments
Process credit and debit card payments with server-to-server or hosted payment pages.
APM Payments
Accept alternative payment methods like PayPal, Apple Pay, and Google Pay.
Payouts
Send payments to beneficiaries, check payout status, and manage transfers.
Wallet
Check wallet balance, estimate payout amounts, and manage wallet transactions.
Refunds
Process full or partial refunds for successful transactions.
Payment Links
Create shareable payment links for customers to complete payments.
Crypto Payments
Accept cryptocurrency payments, create crypto payment links, and process crypto exchanges.
Transactions
Query transaction status, retrieve transaction history, and filter transactions.