Espace DéveloppeursIntégrez les paiements
Intégrez les paiements
en quelques heures
API REST documentée, SDK JavaScript/PHP/Python, webhooks temps réel. Sandbox gratuit pour tester avant de passer en production.
1. Créez votre compte
Inscription gratuite, accès immédiat au sandbox
2. Obtenez vos clés API
Clés de test et de production séparées
3. Installez le SDK
npm install @payvalis/sdk
4. Testez en sandbox
Simulez des transactions sans argent réel
Code
API
Copy, adapt and deploy.
1. Créez votre compte
HTTP
POST https://api.payvalis.com/v1/payment-links
Authorization: Bearer pk_live_xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"amount": 5000,
"currency": "XOF",
"method": "orange_money",
"max_payments": 50,
"description": "Commande #1234",
"redirect_url": "https://votresite.com/merci"
}API Response
JSON
HTTP 201 Created
{
"id": "lnk_abc12345",
"url": "https://pay.payvalis.com/abc12345",
"amount": 5000,
"currency": "XOF",
"method": "orange_money",
"max_payments": 50,
"used_payments": 0,
"status": "active",
"created_at": "2024-01-15T10: 30: 00Z"
}Webhook
HTTP
POST https://votresite.com/webhook/payvalis
X-Payvalis-Signature: sha256=xxxxxxxx
{
"event": "payment.completed",
"payment_link_id": "lnk_abc12345",
"amount": 5000,
"net_amount": 4875,
"commission": 125,
"method": "orange_money",
"payer_phone": "+221700000000",
"paid_at": "2024-01-15T11: 45: 00Z"
}JavaScript SDK
JavaScript
// Installation
npm install @payvalis/sdk
// Usage
import { Payvalis } from '@payvalis/sdk';
const payvalis = new Payvalis({
apiKey: process.env.PAYVALIS_API_KEY,
sandbox: false,
});
const link = await payvalis.paymentLinks.create({
amount: 5000,
currency: 'XOF',
method: 'orange_money',
maxPayments: 50,
});
console.log(link.url);Prêt à intégrer ?
Créez un compte développeur gratuit et commencez à tester avec notre sandbox.