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.
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 |