Refund payments on blocked address
You can make a refund only once.
Request
Query parameters
Name | Parameter type | Definition |
---|---|---|
uuid | stringuuidrequired_without: order_id | uuid of a static wallet |
order_id | stringmin:1max:32alpha_dashrequired_without: uuid | Order ID of a static wallet |
address* | stringmin:10max:128alpha_dash | Refund all blocked funds to this address |
Parameter type
stringuuidrequired_without: order_idDefinition
uuid of a static walletParameter type
stringmin:1max:32alpha_dashrequired_without: uuidDefinition
Order ID of a static walletParameter type
stringmin:10max:128alpha_dashDefinition
Refund all blocked funds to this address
* - mandatory parameter
Request example
curl https://api.cryptomus.com/v1/wallet/blocked-address-refund \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
"order_id": "1",
"address": "TK8..."
}'
COPYResponse
Response parameters
Name | Definition |
---|---|
commission | Commission of refund |
amount | Amount of refund |
Definition
Commission of refundDefinition
Amount of refund
Response example
1{
2 "state": 0,
3 "result": {
4 "commission": "0.50",
5 "amount": "9.50"
6 }
7}
COPYPossible errors
Validation errors
code : 422
Example responses:
If you will not pass a uuid and order_id, you will receive this message. It means that at least one of the parameters is required.
1{
2 "state": 1,
3 "errors": {
4 "uuid": ["validation.required_without"],
5 "order_id": ["validation.required_without"]
6 }
7}
COPYIf static wallet was not found:
1{
2 "state": 1,
3 "message": "Not found"
4}
COPYAl long as withdrawal is allowed only once from blocked static wallet, If the withdrawal was already made you will receive this error message:
1{
2 "state": 1,
3 "message": "You can withdraw only once"
4}
COPYAl long as withdrawal is allowed only once from blocked static wallet, If you blocked a static wallet with a parameter is_force_refund=true, the withdrawal was already made and you will receive this error message:
1{
2 "state": 1,
3 "message": "You can withdraw only once"
4}
COPYIf refund is already in process:
1{
2 "state": 1,
3 "message": "Refund is in process"
4}
COPYIf the payout is blocked on your merchant or user, you will receive this error message. This happens, for example, when you change your password and payouts are blocked for 24 hours.
1{
2 "state": 1,
3 "message": "You are forbidden"
4}
COPYIf no payments were made to the static wallet:
1{
2 "state": 1,
3 "message": "Nothing to withdraw"
4}
COPYIf the payout amount is less than the minimum supported amount for cryptocurrency, you will receive this error message:
1{
2 "state": 1,
3 "message": "The amount is too small"
4}
COPYIf technical work occurs or the payout is temporarily unavailable, you will receive this error messages:
1{
2 "state": 1,
3 "message": "Server error"
4}
COPY
1{
2 "state": 1,
3 "message": "The service was not found"
4}
COPYInternal server error
code : 500
Example responses:
1{
2 "message": "Server error, #1",
3 "code": 500,
4 "error": null
5}
COPY