Create payment
Create a hosted checkout with an amount in taka.
POST
/v1/payment/createpayments:writeParameters
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in taka (BDT), up to two decimal places. |
redirect_url | uri | No | Public HTTPS return page after payment. |
webhook_url | uri | No | Public HTTPS URL for signed payment alerts. |
cancel_url | uri | No | Public HTTPS return page after cancellation. |
reference | string | No | Your order reference; generated if omitted. |
customer_name | string | No | Customer name. |
customer_email | string | No | Customer email address. |
customer_phone | string | No | Contact number; not payment proof. |
metadata | object | No | Order details; never include secrets. |
amount: 150.50 means ৳150.50. Send taka, not paisa.Safe retries
Send Idempotency-Key with 16–128 characters: letters, numbers, underscore, period, colon or hyphen. Reuse the same key and body when retrying the same payment.
Request
curl --fail-with-body "$EKMIVO_API_ORIGIN/v1/payment/create" \
-H "Authorization: Bearer $EKMIVO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-2026-0001" \
--data '{
"amount": 150,
"redirect_url": "https://merchant.example/success"
}'Response
201 Created
{
"invoice_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING",
"payment_url": "https://checkout.example/checkout/TOKEN"
}Deliver only when
status === "COMPLETED" and invoice_id, amount and currency match your order. HTTP 200 alone does not mean paid.