Asset Transfers
An asset transfer is an asynchronous exchange of an asset or an amount to a recipient.
A recipient is an existing Centrapay user or someone who can create an account to claim the asset transfer by verifying their phone number or email.
After an asset transfer is completed the recipientAlias, lastSentTo and message fields are scrubbed to avoid storing PII.
Asset Transfer Model
Attributes
Asset Transfer lifecycle
Asset Transfer goes through different lifecycle stages.
State | Description |
---|---|
requested | Asset transfer successfully requested |
created | Asset transfer successfully created |
sent | Asset transfer notification (sms, email) was sent to a new user |
expired | Asset transfer expired as new user didn't create his account and claimed the asset. This is very short lived state |
returned | Asset transfer expired and was returned to original owner |
claimed | Asset transfer was successfully completed |
cancelled | Asset transfer was cancelled. |
Request an Asset Transfer
Request a transfer of an asset from a sender to the recipient.
Attributes
-
recipientAlias
-
senderAccountId
-
assetType
-
description
-
message
-
suppressNotification
Errors
-
SENDER_NOT_FOUND
-
INVALID_ASSET_TYPE
Accept an Asset Transfer Request
Attributes
-
assetId
-
senderName
-
value
bignumber
Errors
-
ASSET_TRANSFER_REQUEST_EXPIRED
-
ASSET_TRANSFER_REQUEST_ACCEPTED
-
BANK_ACCOUNT_BALANCE_INSUFFICIENT
-
QUOTA_EXCEEDED
-
ASSET_NOT_ACTIVE
-
INVALID_ASSET_TYPE
-
VALUE_NOT_DEFINED
-
VALUE_ALREADY_DEFINED
Create an Asset Transfer
Transfer an asset to a recipient. Some assets can be transfered only in whole (eg tokens) while others can be transfered only in part (eg money).
Some assets can be transferred without supplying a recipient. A url
field will be returned in these cases. The url
will link to a page to claim the asset.
Attributes
-
assetId
-
recipientAlias
-
description
-
message
-
value
bignumber -
senderName
-
suppressNotification
Errors
-
INSUFFICIENT_WALLET_BALANCE
-
QUOTA_EXCEEDED
-
ASSET_NOT_ACTIVE
-
RECIPIENT_MISSING
-
INVALID_ASSET_TYPE
Get an Asset Transfer
Get Asset Transfer Summary
Claim Asset Transfer
Claim the asset transfer for the caller's authorised account.
Errors
-
ASSET_TRANSFER_INVALID_RECIPIENT
-
ASSET_TRANSFER_INVALID_STATUS
Resolve Claimable Assets
When you send another centrapay user cash or assets, they're automatically assigned to them. However, if they're not signed up yet then these assets are not immediately assigned.
If unclaimed, asset transfers are returned after 2 weeks.
New accounts should call this endpoint to allocate assets that you've been sent.
List Asset Transfers
Returns a paginated list of Asset Transfers.
Attributes
-
recipientAccountId
-
senderAccountId
Cancel an Asset Transfer
Errors
-
INVALID_ASSET_TRANSFER_STATUS