Get up and running with PayFlow in just 5 minutes. Accept your first payment today.
Generate a payment link via API
Customer pays via hosted checkout
Get notified via webhook
Your API keys will look like this:
pk_live_1234567890abcdef...curl -X POST https://api.payflow.com/v1/payment_links \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium Course Access",
"description": "Get access to our premium course content",
"amount": 2500,
"currency": "PKR",
"expires_at": "2024-12-31T23:59:59Z"
}'When you create a payment link, you'll receive a response like this:
{
"id": "pl_1234567890",
"url": "https://payflow.com/pay/abc123",
"title": "Premium Course Access",
"amount": 2500,
"currency": "PKR",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}Share the url with your customer. They'll be redirected to a beautiful hosted checkout page where they can complete their payment.
PayFlow will send a webhook to your server when the payment is completed. Set up your webhook endpoint to handle these notifications:
// Your webhook endpoint
app.post('/webhooks/payflow', (req, res) => {
const event = req.body;
switch (event.type) {
case 'payment.succeeded':
// Handle successful payment
console.log('Payment completed:', event.data.id);
break;
case 'payment.failed':
// Handle failed payment
console.log('Payment failed:', event.data.id);
break;
}
res.json({ received: true });
});Pro Tip: Use our webhook testing tool in the dashboard to test webhook delivery before going live.