Quickstart
Introduction
This walkthrough assumes that your client's credentials &
your organization have both been set up by Stablecorp. We will be using ETHEREUM
throughout the guide.
Your clientID reflects your organizationId
which is used to manage your organization's members.
1. Creating Member
Request POST https://api.staging.grapesfinance.com/organizations/member
❗❗TO NOTE❗❗
- At least 1
bank details
/blockchain details
must be provided at member creation - A valid bank
routingNum
must be provided
# replace ${YOUR_CLIENT_ID} accordingly
{
"orgId": "${YOUR_CLIENT_ID}",
"businessName": "Stablecorp",
"firstName": "John",
"lastName": "Doe",
"address": "477 Richmond St W, Toronto",
"postalCode": "M5V 3E7",
"countryCode": "CAN",
"city": "Toronto",
"stateProvince": "Ontario",
"email": "stablecorp@gmail.com",
"interacEmail": "stablecorp@gmail.com",
"createBankDetails": [
{
"country": "CAN",
"accHolderName": "Stablecorp",
"routingNum": "003-00001",
"accountNum": "4442133",
"achCode": "123456789",
"swiftBicCode": "1234567891011"
}
],
"createBlockchainDetails": [
{
"name": "Member 1",
"address": "0x97EbbE02A9491fCbD5f78fa9c4b03a35a1678041",
"chain": "ETHEREUM"
}
]
}
2. KYC & KYB status
Request GET https://api.staging.grapesfinance.com/organizations/member?orgId={YOUR_CLIENT_ID}&memberId={YOUR_MEMBER_ID}
In sandbox, KYC/KYB is automatically approved for all created members.
After adding a member
to you organization
, our compliance team with work with you to approve KYC/KYB.
You can verify the KYC/KYB status of the member via the following endpoint & query paremeters.
Once approved, you will see
"kycStatus": "Approved"
in the response
3. Executing a Member purchase order
Purchase QCAD using Canadian Dollars
Request POST https://api.staging.grapesfinance.com/orders/purchase/member
In this example, the paymentMethod
will be EFT
but eTransfer
and billPay
are both supported.
❗❗TO NOTE ❗❗
- The
address
andbankingDetailsId
provided must be the blockchain wallet address linked to the member
# Replace ${MEMBER_ID}, ${MEMBER_BLOCKCHAIN_ADDRESS} & ${MEMBER_BANK_DETAILS_ID} accordingly
{
"memberId": "${MEMBER_ID}",
"fiatAmount": 1,
"fiatCurrency": "CAD",
"cryptoAmount": 1,
"address": ${MEMBER_BLOCKCHAIN_ADDRESS}
"chain": "ETHEREUM",
"asset": "QCAD_TEST",
"paymentMethod": "EFT",
"firstName": "Test",
"lastName": "User",
"attestation": true,
"fxRate": 1.14,
"fxRateTimestamp": "2232",
"bankingDetailsId": ${MEMBER_BANK_DETAILS_ID}
}
In sandbox, once the order is placed, the crypto assets are automatically sent. In Production, Grapes must first receive the fiat funds from the organization via the request
paymentMethod
.
4. Executing a Member redeem order
Selling QCAD for Canadian Dollars
a. Creating a member redeem order
Request POST https://api.staging.grapesfinance.com/orders/redeem/member
# Replace ${MEMBER_ID}, ${MEMBER_BLOCKCHAIN_ADDRESS} & ${MEMBER_BANK_DETAILS_ID} accordingly
{
"memberId": "${MEMBER_ID}",
"fiatAmount": 1,
"fiatCurrency": "CAD",
"cryptoAmount": 1,
"address": ${MEMBER_BLOCKCHAIN_ADDRESS},
"chain": "ETHEREUM",
"asset": "QCAD_TEST",
"attestation": true,
"paymentMethod": "EFT",
"bankingDetailsId": ${MEMBER_BANK_DETAILS_ID}
}
b. Making a transfer of QCAD
The individual must send the assets as provided in the redeem order request to the Grapes admin wallet.
Grapes admin wallet address can be found via the following request and query parameters.
Request GET https://api.staging.grapesfinance.com/orders/return-address?chain=${YOUR_CHAIN}&asset=${YOUR_ASSET}
c. Processing the order
Finally, the individual has to update the redeem order with the transaction hash for verification by Grapes to confirm the receipt
of assets via the following endpoint. The order will be marked PROCESSED
indicating that the fiat transfer has been sent to the individual
Request PUT https://api.staging.grapesfinance.com/orders/redeem/member
{
# Replace ${MEMBER_ID}, ${ORDER_ID}, ${CRYPTO_TRANSACTION_HASH} & ${MEMBER_BANK_DETAILS_ID} accordingly
"memberId": "${MEMBER_ID}",
"orderId": "${ORDER_ID}",
"txId": "${CRYPTO_TRANSACTION_HASH}",
"paymentMethod": "EFT",
"bankingDetailsId": "${MEMBER_BANK_DETAILS_ID}"
}