IQIraQPayAPI Reference

Withdraw

Create a withdraw (pay-out) request. The amount is reserved from your site treasury; our operators pay the recipient and we notify your callback.

POST/v1/transactions/withdraw

Required attributes

NameTypeDescription
bankIdstringMethod _id or code.
processIdstringYour unique id (idempotent).
amountnumberWithdraw amount in IQD.
userIdstringYour user's id.
userNamestringYour user's username.
namestringYour user's full name.
accountNamestringRecipient name registered at the wallet.
ibanstringRecipient wallet number / card number / account number — validated against the method's identifierKind format (e.g. FIB phone 07XXXXXXXXX, Qi Card 10–19 digits).

Request

curl -X POST "https://api.deuspay.co/v1/transactions/withdraw" \
  -H "appKey: $APP_KEY" -H "sign: $SIGN" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "bankId=FIB" --data-urlencode "processId=WD-2001" \
  --data-urlencode "amount=20000" --data-urlencode "userId=u-42" \
  --data-urlencode "userName=ahmed77" --data-urlencode "name=Ahmed Al-Jubouri" \
  --data-urlencode "accountName=Ahmed Al-Jubouri" --data-urlencode "iban=07709998877"
const body = new URLSearchParams({ bankId: "FIB", processId: "WD-2001", amount: "20000", userId: "u-42", userName: "ahmed77", name: "Ahmed Al-Jubouri", accountName: "Ahmed Al-Jubouri", iban: "07709998877" }).toString();
const sign = createHmac("sha256", APP_SECRET).update(body).digest("base64");
await fetch("https://api.deuspay.co/v1/transactions/withdraw", { method: "POST", headers: { appKey: APP_KEY, sign, "content-type": "application/x-www-form-urlencoded" }, body });

Response

{
  "data": {
    "transactionId": "cmv2mdjam0003xvpi9u57bev7",
    "bankId": "cmv2lm9yb00017pn0fvwxdb7z", "bank": "FIB",
    "amount": 20000, "userId": "u-42", "name": "Ahmed Al-Jubouri", "userName": "ahmed77",
    "processId": "WD-2001", "type": "withdrawal", "convertedName": "ahmedaljubouri",
    "status": "pending", "statusReason": null,
    "accountName": "Ahmed Al-Jubouri", "iban": "07709998877", "identifierKind": "PHONE",
    "hash": "…"
  },
  "status": 200, "responseTime": "41ms", "app_version": "iraqpay-v0.1.0"
}
Withdrawals are checked against your treasury: balance − pending withdrawals − amount must stay above your negative limit, otherwise 402 insufficient_site_balance. See Balance.
If your site has an IP allowlist, withdraw requests from other IPs are rejected with 403 not_authorized. We strongly recommend enabling it.