Return rejected crypto deposit
curl --request POST \
--url https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"destinationAddress": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({destinationAddress: '<string>'})
};
fetch('https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return"
payload = { "destinationAddress": "<string>" }
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chainId": "ETHEREUM_MAINNET",
"asset": {
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"logoUri": "<string>"
},
"amount": "100.000000",
"netAmount": "99.750000",
"fee": {
"amount": "0.250000",
"asset": {
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"logoUri": "<string>"
}
},
"destinationAddress": "<string>",
"depositId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING_SIGNATURE",
"failureReason": "REJECTED_BY_COMPLIANCE",
"transactionId": "<string>",
"expiresAt": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "CRYPTO_WITHDRAWAL_INVALID_DESTINATION",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CRYPTO_DEPOSIT_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CRYPTO_DEPOSIT_RETURN_NOT_ALLOWED",
"message": "<string>",
"detail": {}
}
}Crypto Deposits
Return rejected crypto deposit
Opens a crypto withdrawal of the whole amount of a rejected deposit, less the withdrawal fee, to a destination other than the address it was sent from. Available only once Reap has allowed the return. The withdrawal then runs like any other: fetch a signing payload with GET /crypto-withdrawals/:id/payload and submit the owner signature with POST /crypto-withdrawals/:id/sign.
POST
/
crypto-deposits
/
{id}
/
return
Return rejected crypto deposit
curl --request POST \
--url https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"destinationAddress": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({destinationAddress: '<string>'})
};
fetch('https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/crypto-deposits/{id}/return"
payload = { "destinationAddress": "<string>" }
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chainId": "ETHEREUM_MAINNET",
"asset": {
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"logoUri": "<string>"
},
"amount": "100.000000",
"netAmount": "99.750000",
"fee": {
"amount": "0.250000",
"asset": {
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"logoUri": "<string>"
}
},
"destinationAddress": "<string>",
"depositId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING_SIGNATURE",
"failureReason": "REJECTED_BY_COMPLIANCE",
"transactionId": "<string>",
"expiresAt": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "CRYPTO_WITHDRAWAL_INVALID_DESTINATION",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CRYPTO_DEPOSIT_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "CRYPTO_DEPOSIT_RETURN_NOT_ALLOWED",
"message": "<string>",
"detail": {}
}
}Required scope: CRYPTO_WITHDRAWALS_WRITE
Headers
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Return a rejected crypto deposit
Response
The crypto withdrawal that returns the deposit
Blockchain network the transfer happens on
Available options:
ETHEREUM_MAINNET, ETHEREUM_SEPOLIA, BASE_MAINNET, BASE_SEPOLIA, ARBITRUM_ONE_MAINNET, ARBITRUM_ONE_SEPOLIA, POLYGON_MAINNET, POLYGON_AMOY, MONAD_MAINNET, MONAD_TESTNET, SOLANA_MAINNET, SOLANA_DEVNET Example:
"ETHEREUM_MAINNET"