PhaJay Credit Card Payment Gateway API
1. Overview
This document describes the integration process for PhaJay Payment Gateway API. The API provides a secure way to process online payments through our banking partners using a redirect-based flow that ensures PCI compliance by handling sensitive card data on secure payment pages.
1.1 Integration Workflow
The PhaJay payment integration follows a secure 11-step process:
- 1. Payer clicks pay button: Customer initiates payment on Platform
- 2. Platform sends payment request: Platform requests payment page link from PhaJay
- 3. PhaJay forwards request to Bank: Gateway processes and forwards to banking partner
- 4.Bank responds with payment page link: Bank returns secure payment URL
- 5. PhaJay forwards to Platform: Gateway returns payment link to Platform
- 6. Platform opens payment page to Payer: Customer is redirected to secure payment form
- 7. Payer completes payment: Customer enters card details and submits payment
- 8. Bank redirects to PhaJay success page: After processing, bank redirects to gateway
- 9. Bank notifies callback data via webhook: Bank sends payment result to Platform
- 10. PhaJay redirects to Platform success page: Customer sees Platform's success page
- 11. Platform receives webhook notification: Platform processes final payment confirmation

1.2 Configuration
Before integrating with PhaJay Payment Gateway, you must configure the following in our merchant portal: https://portal.phapay.com (opens in a new tab)
Step 1: Configure Callback URLs
- Login to your account in PhaJay web portal
- Click Settings > Callback URL
- Enter your callback URLs
- Click Save

Step 2: Configure Webhook URL
- Login to your account in PhaJay web portal
- Click Settings > Webhook
- Enter your webhook URL
- Click Save

2. Get Payment Page Link
API Endpoint- URL:
https://payment-gateway.lailaolab.com/v1/api/jdb2c2p/payment/payment-link
- Method:
POST
- Authentication: Basic Auth
{
"Content-Type": "application/json",
"Authorization": `Basic ${Buffer.from(`${key}`).toString("base64")}`
}
Not :
- KEY refers to the secretKey you received after completing KYC on the web portal.
- This API only accepts 3D Secure (3DS) enabled cards.
Request Body
Field | Type | Description |
---|---|---|
amount | Number | Amount to be created for a transaction |
description | String | A description of the transaction or purpose |
tag1 | String | The first custom field of customer system (optional) |
tag2 | String | The second custom field of customer system (optional) |
tag3 | String | The third custom field of customer system (optional) |
{
"amount": 1000,
"description": "Buy a Product",
"tag1": "AppZap Shop",
"tag2": "666bbb461732a2e46233fdf9",
"tag3": "ORDER-0001"
}
Response Body
Field | Type | Description |
---|---|---|
message | String | Status message of the transaction process |
paymentUrl | String | URL where the customer can secure the payment |
expirationTime | DateTime | The expiration time for the payment link in ISO 8601 format (UTC) |
transactionId | String | Unique identifier for the transaction |
status | String | Current status of the transaction (e.g., "WAITING" indicates pending) |
{
"message": "SUCCESSFULLY",
"paymentUrl": "https://payment.paco.2c2p.com/payment/?pid=a49881babe524387b179e142506d89f0&lang=en-US",
"expirationTime": "2025-08-04T07:29:33",
"transactionId": "2e87da27-4f8a-46fd-bea8-5e76dfb1e00d",
"status": "WAITING"
}
3. Redirect to Payment Link
In this step, users are redirected to a secure payment link page to complete the payment process.
The user is redirected to the payment page to complete payment.

Not: This API only accepts 3D Secure (3DS) enabled cards
After clicking the "Continue" button, the transaction will be processed and a notification will be sent to the card owner's banking app for approval. Once approved, you will be redirected to a success page. After 5 seconds, it will automatically redirect to the PhaJay success page. PhaJay will then send the payment result to your platform via webhook.

Not: This API only accepts 3D Secure (3DS) enabled cards
After entering all required fields, clicking the "Continue" button redirects to the confirmation page.

Step 4: Final Redirect Users can click "Skip" to redirect to your platform's success page, or wait for automatic redirect when countdown reaches 0.
4. Webhook Notification
When the transaction is complete PhaJay will return callback data to the platform via webhook that is configured on platform account (1.2 ) This data is sent as part of the HTTPS request (usually a POST ) from the service to the designated webhook URL and Platform's webhook endpoint must respond with HTTPS 200 status code to acknowledge receipt.PI only accepts 3D Secure (3DS) enabled cards
Response Body
Field | Type | Description |
---|---|---|
message | String | Status message of the transaction process |
transactionId | String | Unique identifier for the transaction |
linkCode | String | Code used to reference or access the payment |
paymentMethod | String | Method of payment used (CREDIT_CARD) |
status | String | Current status of the payment |
userId | String | ID of the user with the transaction (PhaJay system ID) |
description | String | Description of the payment |
tag1 to tag6 | String | Additional transaction tags |
successURL | String | Success callback URL |
txnAmount | Number | The transaction amount |
currency | String | The currency of the transaction amount (USD) |
cardType | String | Type of credit card used (e.g., "CC-VI" for Visa) |
creditCardDetails | Object | Card holder information details |
transactionAmount | Object | Detailed transaction amount information |
Example:
{
"message": "SUCCESS",
"transactionId": "2e87da27-4f8a-46fd-bea8-5e76dfb1e00d",
"linkCode": "2e87da27-4f8a-46fd-bea8-5e76dfb1e00d",
"paymentMethod": "CREDIT_CARD",
"status": "PAYMENT_COMPLETED",
"userId": "686e113e59b2cbf66d72583d",
"description": "CREDIT CARD PAYMENT: JAOL-Donation",
"tag1": null,
"tag2": null,
"tag3": null,
"tag4": null,
"tag5": null,
"tag6": null,
"txnAmount": 1,
"currency": "USD",
"cardType": "CC-VI",
"creditCardDetails": {
"issuerCode": null,
"cardHolderName": "KHAMSENG INTHAVONG",
"cardNumber": "412639XXXXXX2372",
"cardExpiry": "XXXX",
"authenticationStatus": null,
"eciValue": null,
"xidValue": null,
"cavvValue": null,
"enrolledFlag": null
},
"transactionAmount": {
"amountText": "000000000100",
"currencyCode": "USD",
"decimalPlaces": 2,
"amount": 1
}
}
Explore the full Credit Card Payment documentation for detailed integration guidelines .
Click here to access:
Credit Card Payment Documentation (PDF)