Complete API reference for PayBridge payment integration.
All API requests require authentication using OAuth2 Bearer tokens.
POST /merchant/api/verify
{
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
{
"status": "success",
"data": {
"accessToken": "eyJ0eXAiOiJKV1Q...",
"expiresIn": 3600
}
}
Create a new payment transaction.
POST /merchant/api/transaction-info
Authorization: Bearer {access_token}
Content-Type: application/json
{
"amount": "100.00",
"currency": "MYR",
"payer": "Mts",
"successUrl": "https://yoursite.com/success",
"cancelUrl": "https://yoursite.com/cancel",
"order_id": "ORD-12345",
"item_name": "Product Purchase",
"payer_name": "John Doe",
"payer_email": "john@example.com",
"payer_phone": "0123456789"
}
{
"status": "success",
"data": {
"grant_id": "abc123",
"token": "xyz789",
"approvalUrl": "https://paybridge.my/merchant/payment?grant_id=abc123&token=xyz789"
}
}
| Status | Description |
|---|---|
| Success | Payment completed successfully |
| Pending | Payment is being processed |
| Failed | Payment failed or rejected |
| Cancelled | Payment cancelled by user |
PayBridge will send callbacks to your success/cancel URLs with these parameters:
| Parameter | Description |
|---|---|
| status | Payment status (success/failed) |
| order_id | Your order reference |
| transaction_id | PayBridge transaction ID |
| amount | Payment amount |
| currency | Payment currency |
| Code | Message | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or expired access token |
| 400 | Bad Request | Missing or invalid parameters |
| 404 | Not Found | Resource not found |
| 500 | Server Error | Internal server error |