Secondary NFT Marketplace Transactions
Conceptual Overview
After an NFT Drop, partners can leverage Wyre's Users API to create a payments layer for their Secondary NFT Marketplace.
With Wyre's Users API, partners can compliantly KYC and store funds for the user as well as allow the user to pay out to their bank account after selling their NFTs on the secondary marketplace for fiat or crypto.
Partners can also leverage Wyre Wallets to manage royalties, fees, and any other carve outs that they'd like to do.
1. Create a Transfer Approved User
Create a User with First Name, Last Name, Date of Birth, Cell Phone Number, Email, and Residential Address.
{
"fields": {
"firstName": "Alberta",
"lastName": "Charleson",
"legalName": "Alberta Charleson",
"dateOfBirth": "1975-03-06",
"cellphoneNumber": "+1112224444",
"email": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"residenceAddress": {
"street1": "2992 Cameron Road",
"city": "Malakoff",
"state": "CA",
"postalCode": "14236",
"country": "US"
}
},
"blockchains": [
"ALL"
],
"scopes": [
"TRANSFER"
]
}
{
"id": "US_39CUCTGTVBB",
"status": "APPROVED",
"partnerId": "PT_UUEJLH74VEN",
"type": "INDIVIDUAL",
"createdAt": 1648361213033,
"depositAddresses": {
"BTC": "miFkpeaFfrLG9A7owsHWQnj8iXitsdB4Gk",
"MATIC": "0xf40501f440eb0c596ee053f88bd43ba9ae136b56",
"AVAX": "0xe494a6d8d10f23630ba9f0b99bf455e9d4951abc",
"ETH": "0x6c70a5acb186d4c447719d24e31a2a80f1539dc1",
"XLM": "GD7WXI7AOAK2CIPZVBEFYLS2NQZI2J4WN4HFYQQ4A2OMFVWGWAL3IW7K:V9PMQ8EYEWC",
"AVAXC": "0xf01724bb979df8ff888805809a014d93087f8d24"
},
"totalBalances": {},
"availableBalances": {},
"fields": {
"firstName": {
"value": "Alberta",
"error": null,
"status": "SUBMITTED"
},
"lastName": {
"value": "Charleson",
"error": null,
"status": "SUBMITTED"
},
"dateOfBirth": {
"value": "1975-03-06",
"error": null,
"status": "SUBMITTED"
},
"residenceAddress": {
"value": {
"street1": "2992 Cameron Road",
"city": "Malakoff",
"state": "NY",
"postalCode": "14236",
"country": "US"
},
"error": null,
"status": "SUBMITTED"
}
}
}
2. Creating Wallets to Process Fees
NFT Marketplaces oftentimes administer fees for royalties, marketplace services, etc. Partners looking to implement these fees can do so through creation of a series of wallets to handle the transactions. Partners will create an intermediary Wyre Wallet then several other subsequent Wyre wallets to store the the funds that are carved out. In the example below we have created:
- A relayer wallet where the funds from the purchase will land
- A subsequent wallet to store the royalties collected
- A different subsequent wallet to store marketplace fees collected
# create a relayer wallet where the funds from a purchase will originally land
curl --location --request POST 'https://api.testwyre.com/v2/wallets' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Relayer",
"callbackUrl": "https://requestinspector.com/p/01fzjyef5b5em6jj51dtmtwvjn",
"type": "DEFAULT",
"notes": "relayer wallet"
}'
# returns WA_AB3AXEZUGV7
# create a wallet to store royalties
curl --location --request POST 'https://api.testwyre.com/v2/wallets' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Royalties",
"callbackUrl": "https://requestinspector.com/p/01fzjyef5b5em6jj51dtmtwvjn",
"type": "DEFAULT",
"notes": "5% royalties"
}'
#returns WA_BZT297LWYCD
# create a wallet to store marketplace fees
curl --location --request POST 'https://api.testwyre.com/v2/wallets' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Marketplace Fees",
"callbackUrl": "https://requestinspector.com/p/01fzjyef5b5em6jj51dtmtwvjn",
"type": "DEFAULT",
"notes": "5% fees"
}'
# returns WA_28MNHR8R7B6
3. Facilitating a Payment for a Secondary Marketplace Sale
If User A lists an NFT for sale, and User B makes the purchase, the relayer wallet will be the initial destination and ultimately 90% of the sale will land in User A's balance.
# USER A - US_39CUCTGTVBB buyer
# USER B - US_U3PB2MVFJGN seller
# User A buys NFT from User B for $10 and has existing funds on the platform
# 1. Transfer from User A's balance to relayer wallet
curl --location --request POST 'https://api.testwyre.com/v3/transfers' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "user:US_39CUCTGTVBB",
"sourceCurrency": "USD",
"sourceAmount": "10",
"dest": "wallet:WA_AB3AXEZUGV7",
"destCurrency": "USD",
"message": "Marketplace purchase",
"autoConfirm": true
}'
# 2. Transfer from relayer wallet to seller
curl --location --request POST 'https://api.testwyre.com/v3/transfers' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "wallet:WA_AB3AXEZUGV7",
"sourceCurrency": "USD",
"sourceAmount": "9",
"dest": "user:US_U3PB2MVFJGN",
"destCurrency": "USD",
"message": "Marketplace purchase",
"autoConfirm": true
}'
# 3. Transfer from relayer wallet to royalties wallet
curl --location --request POST 'https://api.testwyre.com/v3/transfers' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-DN74NZFF' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "wallet:WA_AB3AXEZUGV7",
"sourceCurrency": "USD",
"sourceAmount": ".5",
"dest": "wallet:WA_BZT297LWYCD",
"destCurrency": "USD",
"message": "Marketplace purchase royalties",
"autoConfirm": true
}'
# 4. Transfer from relayer wallet to marketplace fees wallet
curl --location --request POST 'https://api.testwyre.com/v3/transfers' \
--header 'Authorization: Bearer SK-86Z8FYFB-UTA2RDCN-HCZBFT2V-DN74NZFF' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "wallet:WA_AB3AXEZUGV7",
"sourceCurrency": "USD",
"sourceAmount": ".5",
"dest": "wallet:WA_28MNHR8R7B6",
"destCurrency": "USD",
"message": "Marketplace fees",
"autoConfirm": true
}'
The end result will be a $10 marketplace listing paid for by User A, $9 (90%) going to User B, $0.50 (5%) going to royalties, $0.50 (5%) going to the marketplace fees wallet. Fees and royalties in this scenario are completely hypothetical and set by the marketplace partner.
Updated over 2 years ago