diff --git a/404.html b/404.html index ea3de8adf..a13a28b52 100644 --- a/404.html +++ b/404.html @@ -17,7 +17,7 @@ -

Asset Transfers

An asset transfer is an asynchronous exchange of an asset or an amount to a recipient.

+

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 @@ -116,6 +116,35 @@ Copy


+
POST/api/asset-transfer-requests/{assetTransferId}/accept

Attributes

  • assetId

    stringrequired

    Id of the asset to pay the asset transfer request with. Only valid for quartz.nzd assets

  • senderName

    stringrequired

    Human readable name for the sender. 30 character limit.

  • Amount to send. Required if not defined in the request; forbidden if it was.

Errors

  • ASSET_TRANSFER_REQUEST_EXPIRED

    403

    The asset transfer request has already expired

  • ASSET_TRANSFER_REQUEST_ACCEPTED

    403

    The asset transfer request has already been accepted

  • BANK_ACCOUNT_BALANCE_INSUFFICIENT

    403

    The bank account the asset is for does not have enough balance for the transfer

  • QUOTA_EXCEEDED

    403

    The asset transfer would exceed the provided assets quotas

  • ASSET_NOT_ACTIVE

    403

    The asset is not active.

  • INVALID_ASSET_TYPE

    403

    The asset’s type  API  does not match the request.

  • VALUE_NOT_DEFINED

    403

    The value of the asset transfer was not defined in either the initial request or the acceptance

  • VALUE_ALREADY_DEFINED

    403

    The value of the asset transfer was defined in both the initial request and the acceptance

Request
POST/api/asset-transfers-requests/M7Kn2stAxNa6ri7h/accept
curl -X POST \
+ https://service.centrapay.com/api/asset-transfers-requests/M7Kn2stAxNa6ri7h/accept \
+ -H 'content-type: application/json' \
+ -H 'x-api-key: <TOKEN>' \
+ -d '
+{
+ "assetId": "YGRo6TYYSxH3js7",
+ "value": "1000",
+ "senderName": "Jane Doe"
+}
+'
Response
{
+  "assetTransferId": "M7Kn2stAxNa6ri7h",
+  "status": "accepted",
+  "type": "asset-transfer:accepted",
+  "createdAt": "2020-05-02T01:03:37.222Z",
+  "createdBy": "sdasd98199dadas",
+  "assetId": "YGRo6TYYSxH3js7",
+  "senderName": "Jane Doe",
+  "value": "1000"
+}
+
POST/api/asset-transfers

Transfer an asset to a recipient. Some assets can be transfered only in whole (eg giftcards or 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