Create PayHere checkout payload
create_checkout_payloadGenerates the form data and MD5 hash for a PayHere checkout POST request. Returns action URL, form fields, and an HTML snippet.
Instructions
Generates the form data needed to POST a checkout request to PayHere, including the MD5 hash. Returns action URL, form fields, and an HTML snippet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orderId": "<orderId>",
"amount": "<amount>",
"currency": "<currency>",
"items": "<items>",
"customer": "<customer>",
"returnUrl": "<returnUrl>",
"cancelUrl": "<cancelUrl>",
"notifyUrl": "<notifyUrl>"
},
"name": "create_checkout_payload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | Unique order identifier for this payment | |
| amount | Yes | Payment amount (will be formatted to 2dp) | |
| currency | Yes | ISO 4217 currency code, e.g. LKR, USD | |
| items | Yes | Item description shown on the checkout page | |
| customer | Yes | ||
| returnUrl | Yes | URL to redirect to after successful payment | |
| cancelUrl | Yes | URL to redirect to if payment is cancelled | |
| notifyUrl | Yes | Public URL PayHere will POST the payment result to |