Uber Direct + Click2Pay Integration
Seamless delivery booking and payment processing for external websites
Integration Workflow
1
External Website sends order details to your integration API
2
Get Delivery Quote from Uber Direct API
3
Create Payment with Click2Pay for order + delivery fee
4
Confirm Delivery with Uber Direct after payment completion
5
Track & Notify through webhooks and tracking URLs
API Endpoints
POST /api/integration/order
Process an order from an external website and get delivery quote
Request Body:
{
"orderId": "EXT-12345",
"customerInfo": {
"name": "John Doe",
"phone": "+14155551212",
"email": "john@example.com"
},
"items": [
{
"name": "Product A",
"quantity": 2,
"price": 2500,
"size": "medium"
}
],
"pickupAddress": "123 Store St, City, State",
"dropoffAddress": "456 Customer Ave, City, State",
"totalAmount": 5000,
"currency": "CAD",
"webhookUrl": "https://your-website.com/webhook",
"returnUrl": "https://your-website.com/return"
}
Response:
{
"success": true,
"orderId": "internal-uuid-123",
"deliveryQuote": {
"fare": { "amount": 1599 }
},
"totalAmount": 6599,
"currency": "CAD",
"nextStep": "payment"
}
POST /api/integration/payment
Create a Click2Pay payment request for the order
Request Body:
{
"orderId": "internal-uuid-123",
"paymentMethod": "clik2pay"
}
Response:
{
"success": true,
"paymentId": "payment-uuid-456",
"paymentUrl": "https://pay.clik2pay.com/xyz",
"amount": 6599,
"currency": "CAD"
}
POST /api/integration/confirm
Confirm order and create Uber Direct delivery after payment
Request Body:
{
"orderId": "internal-uuid-123",
"paymentId": "payment-uuid-456"
}
Response:
{
"success": true,
"orderId": "internal-uuid-123",
"deliveryId": "delivery-uuid-789",
"uberDeliveryId": "del_abc123",
"trackingUrl": "https://track.uber.com/del_abc123",
"status": "confirmed"
}
POST /api/webhooks/clik2pay
Webhook endpoint for Click2Pay payment notifications
Webhook Payload:
{
"paymentRequestId": "clik2pay-payment-id",
"status": "completed",
"amount": 6599
}
Test Integration
Use this form to test the integration workflow: