Skip to main content
POST

Overview

Creates a deposit: your customer pays money into an account held by a C2C member, and the amount, minus fees, is credited to your merchant wallet once the member confirms receipt. C2C assigns an available member when the order is created and returns a paymentPageUrl. Redirect your customer to that hosted page. It opens on the payment method you requested in walletType: the customer sees the account number, Till ID or QR code to pay, sends the money from their wallet app, and confirms the payment on the page. See the Deposit flow for the full lifecycle. The order is always accepted. If no eligible member is available right now, it’s created with status Awaiting, and a member is assigned when the customer opens the payment page.
Deposits and withdrawals use the same endpoint. Set orderType to "Deposit" to create a deposit.

Headers

string
required
mk_live_..., your merchant API key. Authorization: Bearer mk_live_... is also accepted.
string
required
Your unique key for this order attempt, up to 100 characters. Retrying with the same key returns the original order instead of creating a new one. See Idempotency.
string
required
application/json

Request body

string
required
Must be "Deposit".
number
required
Amount the customer pays, in currency. Must be greater than 0, have at most 4 decimal places and be less than 100,000,000,000,000.Example: 1500
string
required
The payment method the customer pays with. C2C assigns a member with a receiving account of exactly this method, and the payment page opens directly on it.One of JazzCash, JazzCashTillID, JazzCashQR, Easypaisa, TillID, EasypaisaQR, BankAccount.No method falls back to another. JazzCash and Easypaisa mean the account number only: request JazzCashTillID or TillID for a Till ID. If no account of the requested method is available, the order is accepted as Awaiting. On the payment page the customer can still switch to another method that is enabled for you.
string
default:"PKR"
ISO currency code: PKR, INR or BDT. Defaults to PKR.
string
Your own reference for this order, such as an invoice or cart ID. Up to 200 characters. It is echoed in webhooks, and you can query the order by it.
One live order per reference: if an order that is in progress or completed already uses this merchantOrderRef, the request is rejected with 409. A reference whose earlier order failed can be reused. To retry a request, reuse the same Idempotency-Key instead. See merchantOrderRef rules.
string
Your identifier for the paying customer, for example a player ID. Up to 200 characters.
string
Absolute http(s) URL that receives the order.completed / order.failed webhooks for this order. Up to 500 characters. It must resolve to a public internet address: loopback, private and link-local addresses are refused at delivery time, and redirects aren’t followed.If omitted, C2C uses the default callback URL set in your Merchant Portal → Settings. If neither is set, no webhook is sent and you must poll order status.
string
Absolute http(s) URL, up to 500 characters. When the order completes, the hosted payment page sends the customer here, with c2c_order_id, c2c_order_reference and c2c_status appended. See Returning the customer.
string
Absolute http(s) URL, up to 500 characters. Where the hosted payment page sends the customer when the order is rejected, expires or is cancelled. The same parameters are appended.
string
Free-form string, for example JSON-encoded, stored with the order for reconciliation. Up to 1000 characters. It isn’t returned in API responses or webhooks.
integer
default:"4"
4 to 8. Applies to the account number and Till ID methods only (JazzCash, JazzCashTillID, Easypaisa, TillID): how many trailing digits of the wallet transaction ID the customer enters on the payment page.It has no effect on a payment made with JazzCashQR or EasypaisaQR. Those methods don’t ask for a transaction ID: the customer gives their JazzCash account number (JazzCashQR) or the last 4 digits of their Easypaisa IBAN (EasypaisaQR) instead. See What the customer submits.
integer
default:"3"
0 to 10. Only used by withdrawals: it limits how often C2C reassigns an order to another member. It has no effect on deposits.
string
required
32-character lowercase hex MD5 of the other top-level fields (lowercased keys in ASCII order, key=value joined with &, null and empty values skipped) followed directly by your signing secret. See the Signature Generation Guide.Example: f2eb65603d36507621fdfd64aba78974

Response

object

Error responses

See Errors for the complete error model.
If a request was rejected (400, 409, 422 …), you can fix it and reuse the same Idempotency-Key, because rejected requests don’t consume the key.

What happens next

  1. Redirect the customer to paymentPageUrl immediately. The link expires after 15 minutes.
  2. If the order is Awaiting, a member is assigned when the customer opens the payment page. Until one is online the page shows “Finding an available agent…” and re-checks every 10 seconds.
  3. The customer pays and confirms on the page: with the last digits of the transaction ID, or on the QR methods by giving the account they pay from. The order moves to AwaitingCustomerPayment and then AwaitingMemberConfirmation.
  4. The member confirms (Completed) or rejects (Rejected) the payment.
  5. You receive a webhook, and you can query the status at any time. If you set successUrl / failureUrl, the payment page sends the customer back to you.
Fulfil the purchase only when the order status is Completed, never on the creation response.

Next steps

Deposit flow

Full lifecycle, statuses and timeouts

Query order status

Track the order to completion

Payment methods

The six methods and how they are matched

Hosted payment page

What your customer sees

Webhooks

Get notified when the order completes