Welcome To grahokpay.com Docs Last updated: 2026-10-22
grahokpay.com is a simple and Secure payment automation tool which is designed to use personal account as a payment gateway so that you can accept payments from your customer through your website where you will find a complete overview on how grahokpay.com works and how you can integrate grahokpay.com API in your website
API Introduction
grahokpay.com lets merchants collect payments by redirecting customers to the payment subdomain (example: pay.grahokpay.com). After payment, the customer is sent back to your success or cancel URL with a transactionId query parameter. You must then call the Verify API with your API key. Optional webhook_url can receive server-to-server updates.
API Operation
REST APIs are supported in two environments. Use the Sandbox environment for testing purposes, then move to the live environment for production processing. When testing, generate an order url with your test credentials to make calls to the Sandbox URIs. When you’re set to go live, use the live credentials assigned to your new signature key to generate a live order url to be used with the live URIs. Your server has to support cURL system. For HTML Form submit please review after cURL part we provide HTML Post method URL also
Live API End Point (Create Payment URL):
https://pay.grahokpay.com/api/payment/create
Payment Verify API:
https://pay.grahokpay.com/api/payment/verify
Both endpoints accept POST with JSON body. Authentication is the API-KEY header (Brand API key from your dashboard). SECRET-KEY and BRAND-KEY are not used by the current API.
Parameter Details
Variables Need to POST to Initialize Payment Process in gateway URL
Field Name
Description
Required
Example Values
amount
Total amount payable (numeric, max 1000000).
Yes
10 or 10.50
success_url
Full URL where the customer is sent after payment (success or pending). Query param transactionId is appended.
Yes
https://yourdomain.com/payment/success
cancel_url
Full URL if the customer cancels or payment fails.
Yes
https://yourdomain.com/payment/cancel
cus_name
Customer full name. Optional; defaults to Default Name.
No
John Doe
cus_email
Customer email. Optional; defaults to default@gmail.com.
No
john@gmail.com
webhook_url
Optional server webhook URL.
No
https://yourdomain.com/payment/webhook
metadata
JSON object (not a string, not meta_data). Stored and returned on verify.
No
{"order_id": 123}
Variables Needs For Payment Verify
Field Name
Description
Required
Example Values
transaction_id
Transaction id received as a query parameter from the success URL provided during payment creation.
Yes
OVKPXW165414
Headers Details
Header Name
Value
Content-Type
application/json
API-KEY
Brand API key from your merchant dashboard (same key used as GRAHOKPAY_API_KEY)
Integration
You can integrate our payment gateway into your PHP Laravel WordPress WooCommerce sites.
Checkout page. Send the customer here. Not an error.
Error response (create failed)
This JSON is returned only if API key is invalid or required fields are missing. It does not include payment_url.
{ "status": 0, "message": "Your request with Invalid Parameters."}
Field Name
Type
Description
status
int
0 = failed
message
String
e.g. Invalid Parameters, Invalid API Request
After the customer pays, they return to your success_url with query params such astransactionId. Confirm with the Verify API; do not trust the query string alone.
COMPLETED, PENDING or ERROR (payment result). Treat only COMPLETED as paid. This is not the API error object.
cus_name
String
Customer Name
cus_email
String
Customer Email
amount
String
Amount
transaction_id
String
System transaction id (from redirect query transactionId)
metadata
json string
JSON-encoded metadata from create
payment_method
String
Gateway used (bkash, nagad, etc.)
Error response (verify API call failed)
Keep this section. It is a different JSON: the API could not look up the payment (wrong/missing transaction_id, or invalid API key). There is no payment_method here.
{ "status": 0, "message": "failed"}
Field Name
Type
Description
status
int
0
message
String
failed / Required field missing / Invalid API Request
Modules
WordPress Module
Integrate our payment gateway into your WordPress website effortlessly. Whether you run an e-commerce store, a membership site, or a donation platform, our WordPress module makes it easy to accept payments online. Download now and start accepting payments with ease!
Integrate our payment gateway seamlessly into your WHMCS setup. With our module, you can easily accept payments from your customers, manage invoices, and track transactions effortlessly. Get started with just a few clicks!
Enhance your SMM panel with our payment gateway integration module. Streamline the payment process for your social media marketing services and provide a seamless experience for your clients. Download the module now and take your SMM panel to the next level!