Appearance
Pay a crypto beneficiary​
POST
/v2/crypto/payments
Requires WITHDRAWALS_CREATE, granted by WITHDRAWALS_WRITE (bundles)
Sends crypto from the account (the primary, or the sub-account selected with X-VALR-SUB-ACCOUNT-ID) to an address-book beneficiary straight away, with no approval step. Send beneficiaryId for an active address-book entry on that account, or newBeneficiary to add one and pay it in the same call; the address, network and payment reference always come from the beneficiary, currency defaults to BTC, and the network's normal fee for feePriority is charged on top of amount (a fee in the body is ignored). The response holds the withdrawal's id; track it with GET /v1/wallet/crypto/{currency}/withdraw/{id}.
Request Body​
application/json
JSON
{
"amount": "0.015",
"currency": "BTC",
"beneficiaryId": "9d2b7e4f-1a6c-4f83-b5e0-6c9a3d7f2b18"
}
Responses​
Accepted
application/json
Samples​
Errors
| HTTP | Error | When |
|---|---|---|
| 400 | -113INVALID_JSON | The body isn't valid JSON. |
| 400 | -11INVALID_REQUEST | The body is empty or a field fails validation, including a newBeneficiary field or missing travel-rule details (beneficiaryName, isCorporate, isSelfHosted, and a service provider for a hosted wallet) for an address outside VALR; validationErrors lists each failing field. |
| 400 | -109INVALID_CURRENCY_SYMBOL | currency isn't a recognised currency. |
| 400 | -18104PAYMENT_BENEFICIARY_DETAILS_REQUIRED | Neither beneficiaryId nor newBeneficiary was sent. |
| 400 | -13426ADDRESS_BOOK_ENTRY_LABEL_IN_USE | Another address-book entry on the account already uses newBeneficiary.label. |
| 400 | -50INVALID_WITHDRAW_ADDRESS | The beneficiary's address isn't valid for this currency and network. |
| 400 | -13410PAYMENT_REFERENCE_MISSING | The beneficiary's address needs a payment reference, such as a memo or tag. |
| 400 | -13405INVALID_WITHDRAW_TRANSACTION_REFERENCE | The beneficiary's payment reference isn't valid for this address. |
| 400 | -13402CURRENCY_DOES_NOT_SUPPORT_PAYMENT_REFERENCE | The beneficiary has a payment reference, but this currency and network don't use one. |
| 400 | -13415WITHDRAWALS_TEMPORARILY_SUSPENDED | Withdrawals are paused for a while after a security change on your account, such as a password reset or a new device; the message says when they're re-enabled. |
| 400 | -13411WITHDRAW_AMOUNT_BELOW_MINIMUM | amount is below the minimum withdrawal for this currency and network. |
| 400 | -13404INVALID_WITHDRAW_AMOUNT | amount isn't valid for this currency and network, for example it has too many decimal places. |
| 400 | -13419NETWORK_FEE_FOR_TRANSACTION_EXCEEDED | Withdrawals to the beneficiary's address aren't allowed because sending to it would cost too much in network fees. |
| 400 | -6INSUFFICIENT_BALANCE | The account's available balance doesn't cover amount plus the network fee. |
| 400 | -108WITHDRAW_LIMIT_REACHED | The payment would exceed your daily withdrawal limit. |
| 400 | -32765WITHDRAWAL_RESTRICTION_APPLIED | The payment would take your portfolio below the minimum value it must keep. |
| 400 | -19243BORROW_FOR_WITHDRAWAL_NOT_AVAILABLE | allowBorrow was set, but borrowing for withdrawals is unavailable at the moment. |
| 400 | -19244BORROW_FOR_WITHDRAWAL_NOT_AVAILABLE_FOR_SELECTED_CURRENCY | allowBorrow was set, but this currency can't be borrowed for a withdrawal. |
| 400 | -19213MARGIN_NOT_ENABLED_FOR_ACCOUNT | allowBorrow was set, but margin isn't enabled on the account. |
| 400 | -11533CURRENCY_BORROW_EXCEEDED_FOR_COLLATERALIZED_LENDING | Borrowing the shortfall would exceed the account's borrow limit for this currency. |
| 400 | -11534ACCOUNT_BORROW_EXCEEDED_FOR_COLLATERALIZED_LENDING | Borrowing the shortfall would exceed the account's total borrow limit. |
| 404 | -18106PAYMENTS_API_DISABLED | This endpoint isn't available yet. |
| 404 | -18101PAYMENT_BENEFICIARY_NOT_FOUND | No address-book entry with beneficiaryId exists on the account. |
| 409 | -18103PAYMENT_BENEFICIARY_NOT_ACTIVE | The address-book entry with beneficiaryId hasn't been activated. |
| 500 | -19502CURRENCY_UNDER_MAINTENANCE | Withdrawals of this currency are paused for maintenance. Try again in a few minutes. |
| 500 | -46WITHDRAW_UNAVAILABLE | Withdrawals of this currency on this network are unavailable at the moment. Try again later. |
| 500 | -19202INSUFFICIENT_LIQUIDITY_FOR_BORROW | allowBorrow was set, but the amount to borrow isn't available right now. Try again later. |
| 503 | -12015WITHDRAWALS_NOT_AVAILABLE | Withdrawals are unavailable at the moment. Try again later. |
Plus the errors common to all signed endpoints.