Skip to content
ekmivo.Developers
Dashboard
On this pageParametersSafe retriesRequestResponse

Create payment

Create a hosted checkout with an amount in taka.

POST/v1/payment/createpayments:write

Parameters

FieldTypeRequiredDescription
amountnumberYesAmount in taka (BDT), up to two decimal places.
redirect_urluriNoPublic HTTPS return page after payment.
webhook_urluriNoPublic HTTPS URL for signed payment alerts.
cancel_urluriNoPublic HTTPS return page after cancellation.
referencestringNoYour order reference; generated if omitted.
customer_namestringNoCustomer name.
customer_emailstringNoCustomer email address.
customer_phonestringNoContact number; not payment proof.
metadataobjectNoOrder 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"
}

Selected response fields. For the full schema, see API reference.

Deliver only when status === "COMPLETED" and invoice_id, amount and currency match your order. HTTP 200 alone does not mean paid.