Create a deposit
Creates either a backwards-compatible redirect checkout or an H2H
deposit. Omit checkout_mode (or send redirect) for the legacy
bearer-only flow. Send checkout_mode: h2h, a payer phone, and both
H2H signature headers for API-controlled checkout.
merchant_id is the idempotency key within your organization. Repeating
an identical H2H request returns the existing deposit. Reusing the same
value with different immutable fields returns 409.
next_action is a discriminated union. For display_instructions, render
the returned values and submit the payer's transaction ID to the returned
verification endpoint. For redirect, open the returned URL and do not
call the manual verification endpoint.
Authorization
bearerAuth API key created in the OmniPay developer dashboard.
In: header
Header Parameters
Required for H2H. Current Unix time in whole seconds; accepted within five minutes.
^\d+$Required for H2H. Versioned HMAC signature of the canonical request.
^v1=[A-Za-z0-9_-]+$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create request for a bearer-authenticated redirect checkout.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/deposits" \ -H "Content-Type: application/json" \ -d '{ "amount": "500.00", "payment_method": "bkash_merchant", "redirect_url": "https://merchant.example/return", "merchant_id": "order-123", "checkout_mode": "h2h", "payer": { "phone": "01712345678" }, "metadata": { "invoice_id": "INV-123" } }'{ "id": "cm7deposit01", "amount": "1000", "payment_method": "bkash", "status": "pending", "metadata": { "invoice_id": "INV-124" }, "merchant_id": "order-124", "redirect_url": "https://omnipay.page/api/v1/payments/cm7deposit01"}