Refund payments on blocked address

post
https://api.cryptomus.com/v1/wallet/blocked-address-refund
COPY

You can make a refund only once.

Request

Query parameters

NameParameter typeDefinition
uuidstringuuidrequired_without: order_iduuid of a static wallet
order_idstringmin:1max:32alpha_dashrequired_without: uuidOrder ID of a static wallet
address*stringmin:10max:128alpha_dashRefund all blocked funds to this address

Parameter type

stringuuidrequired_without: order_id

Definition

uuid of a static wallet

Parameter type

stringmin:1max:32alpha_dashrequired_without: uuid

Definition

Order ID of a static wallet

Parameter type

stringmin:10max:128alpha_dash

Definition

Refund all blocked funds to this address

* - mandatory parameter

To refund payments you need to pass either uuid or order_id, if you pass both, the static wallet will be identified by uuid

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..."
}'
COPY

Response

Response parameters

NameDefinition
commissionCommission of refund
amountAmount of refund

Definition

Commission of refund

Definition

Amount of refund

Response example


1{
2    "state": 0,
3    "result": {
4        "commission": "0.50",
5        "amount": "9.50"
6    }
7}
COPY

Possible 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}
COPY

If static wallet was not found:


1{
2    "state": 1,
3    "message": "Not found"
4}
COPY

Al 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}
COPY

Al 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}
COPY

If refund is already in process:


1{
2    "state": 1,
3    "message": "Refund is in process"
4}
COPY

If 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}
COPY

If no payments were made to the static wallet:


1{
2    "state": 1,
3    "message": "Nothing to withdraw"
4}
COPY

If 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}
COPY

If 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}
COPY

Internal server error

code : 500

Example responses:


1{
2	"message": "Server error, #1",
3	"code": 500,
4	"error": null
5}
COPY