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: U2FsdGVkX18TidECaKdmYOxIP2wlvBRXHNNNQJbSHpdzjoFH6zgQNtT4djMQ1+LZ+7lghzbD7eOXdShuuyzbT2uxPJUZtV/vehQ/NrQGt0tQgL5cFi55xGSLLJSDXQKAeFlmnRvbjrWgUiSVUQxluRwL7QPTxDrqiEO5/GzuWCQIgKKWxxvbLZLdQraYI3VbQphNUmOPPoM7l0tk1kUy2A==
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
application/json
objectoptional

Successful response

post
POST /api-gateway/orphan-deposits/withdrawal HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 353

{
  "token": "U2FsdGVkX18TidECaKdmYOxIP2wlvBRXHNNNQJbSHpdzjoFH6zgQNtT4djMQ1+LZ+7lghzbD7eOXdShuuyzbT2uxPJUZtV/vehQ/NrQGt0tQgL5cFi55xGSLLJSDXQKAeFlmnRvbjrWgUiSVUQxluRwL7QPTxDrqiEO5/GzuWCQIgKKWxxvbLZLdQraYI3VbQphNUmOPPoM7l0tk1kUy2A==",
  "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
  "comment": null,
  "webhookUrl": "https://merchant.domain/webhooks/orphan"
}
200Success
{
  "success": true,
  "response": {
    "id": "110fff85-19ed-4758-872c-9d4635ff1694",
    "organizationId": "52d410c2-3b26-4c38-820c-3c115086f7fd",
    "orderId": "cf8e59f9-6591-4483-a920-ab5902a28a43",
    "stage": "DEPOSIT",
    "status": "PROCESSED",
    "message": null,
    "currency": "BNB",
    "network": "ethereum",
    "amount": "0.00612",
    "canWithdrawal": true,
    "inTransaction": {
      "addressType": "PAY_IN",
      "addressId": "e2556605-68c6-44f8-9e31-1633bbb997e3",
      "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
      "txId": "0xdb81763509668071c5d2a18f295d8d7ac48a7a31927ed2463cea41e291394f8f",
      "amount": "0.00612",
      "status": "processed",
      "createdAt": "2024-12-25T14:35:23.099Z"
    },
    "outTransaction": {
      "address": "0x4642BEd309FdB7FFdB34175Cf39c409711cefa5a",
      "txId": "0xdb81763509668071c5d2a18f295d8d7ac48a7a31927ed2463cea41e291394f8f",
      "amount": "0.00612",
      "status": "processed",
      "feeAmount": "0.000090942",
      "feeAmountUSD": "0.03",
      "withdrawalId": "fa1db38e-d9dc-43d0-921b-eb28841e7302",
      "createdAt": "2024-12-25T14:35:23.099Z"
    },
    "createdAt": "2024-12-25T14:35:23.099Z"
  }
}

Last updated