API · scope create_payment
Checkout (native)
The native endpoint takes explicit customer fields. It creates the same payment and returns the same response as create charge.
POST https://payment.yamin.bd/api/checkout/redirect
Content-Type: application/json
MHS-GUARANTEEPAY-API-KEY: YOUR_API_KEY
Body fields
| Field | Required | Notes |
|---|---|---|
full_name | yes | Customer name. |
email_address | yes | Must be a valid email. |
mobile_number | yes | Any non-empty value. |
amount | yes | Positive plain decimal string. |
currency | no | Defaults to BDT. |
return_url | no | Where the customer returns. Host must be whitelisted. |
webhook_url | no | Your webhook endpoint. Host must be whitelisted. |
metadata | no | JSON object, returned unchanged. |
Example request
{
"full_name": "Rahim Uddin",
"email_address": "rahim@example.com",
"mobile_number": "01700000000",
"amount": "500",
"currency": "BDT",
"metadata": { "order_id": "ORD-1001" },
"return_url": "https://shop.example.com/pay/return?order_id=ORD-1001",
"webhook_url": "https://shop.example.com/hooks/guaranteepay"
}
Response
{ "status": true, "pp_id": "k3J9x…", "pp_url": "https://payment.yamin.bd/payment/k3J9x…" }
Popup variant
POST /api/checkout/popup takes the same fields except return_url. Use it when you open pp_url in a popup or in-app browser and rely on the webhook or verify call instead of a redirect.