Withdrawal

Receiving a commission token to withdraw an orphan transaction

Withdrawal

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body
tokenstringOptional

Withdrawal Token

Example: U2FsdGVkX1+UDjx4pnfjZbIC0muZGDfOboL0tms5QFA87lqxh8JFhf9pOwM8GB8erEJiE0OOh5b8OK/jxJLWR2KI88aq9bEcgEYdhqVVH6TGWqv6P/XulrKcY4J+CyK0tyxCQIRySNeaH3jkFzgLDK1Avx/AYR1NWkxtV4UK8i5RFdWwVVvkFPjwuBzdgAVJhpupIHwGdTvF3bjue+/DFQ==
addressstringOptional

Output address

Example: 0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a
commentstring | nullOptional

Comment on the conclusion

webhookUrlstringOptional

URL for sending a webhook about the withdrawal

Example: https://merchant.domain/webhooks/orphan
Responses
200Success
application/json
post
POST /api-gateway/orphan-deposits/withdrawal HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 353

{
  "token": "U2FsdGVkX1+UDjx4pnfjZbIC0muZGDfOboL0tms5QFA87lqxh8JFhf9pOwM8GB8erEJiE0OOh5b8OK/jxJLWR2KI88aq9bEcgEYdhqVVH6TGWqv6P/XulrKcY4J+CyK0tyxCQIRySNeaH3jkFzgLDK1Avx/AYR1NWkxtV4UK8i5RFdWwVVvkFPjwuBzdgAVJhpupIHwGdTvF3bjue+/DFQ==",
  "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
  "comment": null,
  "webhookUrl": "https://merchant.domain/webhooks/orphan"
}
200Success
{
  "success": true,
  "response": {
    "id": "5aca05fd-ad24-4d48-947f-66a1f2b236f4",
    "organizationId": "cd96cd70-5e49-4fb0-a135-c338c47721bc",
    "orderId": "e183f76a-880d-4071-934c-a26a12e10b6e",
    "stage": "DEPOSIT",
    "status": "PROCESSED",
    "message": null,
    "currency": "BNB",
    "network": "ethereum",
    "amount": "0.00612",
    "canWithdrawal": true,
    "inTransaction": {
      "addressType": "PAY_IN",
      "addressId": "3c675885-c1cd-42fd-a319-c5dc86adb890",
      "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
      "txId": "0xdb81763509668071c5d2a18f295d8d7ac48a7a31927ed2463cea41e291394f8f",
      "amount": "0.00612",
      "status": "processed",
      "createdAt": "2025-07-15T10:50:46.019Z"
    },
    "outTransaction": {
      "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
      "txId": "0xdb81763509668071c5d2a18f295d8d7ac48a7a31927ed2463cea41e291394f8f",
      "amount": "0.00612",
      "status": "processed",
      "feeAmount": "0.000090942",
      "feeAmountUSD": "0.03",
      "withdrawalId": "e58f74ea-2798-4865-944b-5d46e92ddcd3",
      "createdAt": "2025-07-15T10:50:46.019Z"
    },
    "createdAt": "2025-07-15T10:50:46.019Z"
  }
}

Last updated