Users
The Users endpoint provides functionality to fetch user details for your Grapes Account. It allows you to retrieve information associated with your user profile, such as email, address, bank account information, and interac email for e-transfers.
The Users endpoints are primarily designed for retrieving and updating user and banking details associated with your Grapes Account. Further changes or modifications to user settings, preferences, or account configurations must be made within the Grapes app.
If you would like to use the users API to generate individual Grapes accounts or you are interested in using our onboarding APIs, please reach out to support@grapesfinance.com. Grapes must manually configure the Users API as this is an additional feature.
The following Users endpoints are available:
GET /users/profile
POST /users/profile/bankDetails
DELETE /users/profile/bankDetails
PUT /users/profile
PUT/users/profile/bankDetails/setPrimary
The Users endpoints are described in more detail as follows. This documentation is a summary and is meant to be read in conjunction with the swagger documentation.
GET /users/profile
You can fetch your personal profile details and banking details using this endpoint.
Response Body:
{
"email": "user@stablecorp.ca",
"firstName": "Test",
"lastName": "User",
"accountType": "INDIVIDUAL",
"accountId": 19081569,
"address": "477 Richmond Street West",
"city": "Toronto",
"stateProvince": "ON",
"countryCode": "CAN",
"postalCode": "M5V 3E7",
"interacEmail": "test@stablecorp.ca",
"bankDetails": [
{
"id": 1,
"country": "CAN",
"name": "Bank of Canada",
"accHolderName": "Test User",
"routingNum": "123-45678",
"accountNum": "1234567",
"achCode": "",
"swiftBicCode": "",
"isPrimary": false,
"createdAt": "2023-05-15T18:22:08.464Z",
"updatedAt": "2023-05-15T18:22:08.464Z"
}
]
}
Description:
Field | Type | Description |
---|---|---|
string | The email address associated with the user's account. In this case, the email is "user@stablecorp.ca". | |
firstName | string | The first name of the user. In this case, the first name is "Test". |
lastName | string | The last name of the user. In this case, the last name is "User". |
accountType | string | The type of the user's account. In this case, it is "INDIVIDUAL". |
accountId | integer | The unique identifier of the user's account. In this case, the account ID is 19081569. |
address | string | The user's street address. In this case, the address is "477 Richmond Street West". |
city | string | The city where the user is located. In this case, the city is "Toronto". |
stateProvince | string | The state or province where the user is located. In this case, the state/province is "ON" (Ontario). |
countryCode | string | The country code of the user's location. In this case, the country code is "CAN" (Canada). |
postalCode | string | The postal code or ZIP code of the user's location. In this case, the postal code is "M5V 3E7". |
interacEmail | string | The Interac email associated with the user's account. In this case, the Interac email is "test@stablecorp.ca". |
bankDetails | array | An array containing the user's bank details. In this case, there is one bank detail object in the array. |
id | integer | The unique identifier of the bank detail. In this case, the ID is 1. |
country | string | The country associated with the bank detail. In this case, the country is "CAN" (Canada). |
name | string | The bank name associated with the bank detail. In this case, the name is "Bank of Canada". |
accHolderName | string | The account holder name associated with the bank detail. In this case, the account holder name is "Test User". |
routingNum | string | The routing number associated with the bank detail. In this case, the routing number is "123-45678". |
accountNum | string | The account number associated with the bank detail. In this case, the account number is "1234567". |
achCode | string | The ACH code associated with the bank detail. In this case, the ACH code is empty. |
swiftBicCode | string | The SWIFT/BIC code associated with the bank detail. In this case, the SWIFT/BIC code is empty. |
isPrimary | boolean | Indicates whether the bank detail is the primary one. In this case, it is set to false. |
PUT /users/profile
This endpoint is used to update the banking details and interac id for your user profile. Please refer to the next section for more information on banking details.
POST /users/profile/bankDetails
This endpoint is used to add banking details to your user profile. To add banking details for third-party payouts, please use the Contacts endpoints.
The required information is currently designed to support US and Canadian bank information. It allows a Grapes user to enter their banking details into our system, facilitating transactions such as digital asset to fiat conversions and settlement of the fiat directly to the user’s bank account.
Bank details will provide the linked Grapes user bank information for Canadian and US bank accounts such as bank name, account number, account holder name. Below, we’ll explore each of these fields in more detail and explain how to provide them in the correct format to successfully complete transactions via Grapes API.
Canadian Bank Accounts
- Country: This field specifies the country where the banking institution is located. For Canadian banks, this field should be "CAN".
- Account Holder Name: This field is required to include the full legal name of the account holder. It must match the name of the authorized account holder or authorized user of the bank account. Example: ”John Doe”.
- Bank Name: This field requires the full official name of the bank where the account is held. This must match exactly with the name as listed by the bank. Example: “Royal Bank of Canada”.
- Institution Number: For Canadian banks, this is a three-digit number that identifies the specific banking institution. Please input this as a three-digit numerical value. This is not the transit number which identifies the specific branch of the financial institution where the account is held. Example: “003”. This can be found on a cheque or your online banking portal.
- Transit Number: For Canadian banks, this is a five-digit number that identifies the exact branch of a banking institution where the associated bank account is held. This is required to direct the funds to the correct brank of the bank. Please input this as a five-digit numerical value. Example: “12345”.
- Account Number: This account number is the unique identifier for the individual bank account held by the account holder or authorised user at a bank. For Canadian banks it can be 7 to 12 digits long. Example:”123456789012”.
US Bank Accounts
- Country: This field specifies the country where the banking institution is located. For US banks, this field should be “US”.
- Account Holder Name: This field is required to include the full legal name of the account holder. It must match the name of the authorized account holder or authorized user of the bank account. Example:” Jane Doe”.
- Bank Name: This field requires the full official name of the bank where the account is held. This must match exactly with the name as listed by the bank. Example:” Bank of America”.
- ACH Code: This is a unique nine-digit number assigned to each banking institution and is used for Automated Clearing House (ACH) transfers which is commonly used for direct deposits in the US. It is a 9-digit code. Example:”021000322”.
- SWIFT/BIC Code: This code is required for international transfers. This field can range from 8 to 11 characters longs. This code is used to identify banks when funds need to be correctly directed during international transactions. It is 8 or 11 alphanumeric characters. Example: “BOFAUS3NXXX”.
- Account Number: This account number is the unique identifier for the individual bank account held by the account holder or authorised user at a bank. For US banks it can be 10 to 12 digits long. Example:”123456789012”.
When providing this banking information via Grapes API, ensure accurate and up-to-date banking information is provided in the correct format, be mindful of case sensitivity and verify details with the bank.
DELETE /users/profile/bankDetails
Remove a banking details associated with your user profile. This action permanently deletes the banking information and all associated data.
PUT/users/profile/bankDetails/setPrimary
Multiple bank details can be stored under your profile, for example if you have a Canadian or US bank account, you can store both. This endpoint allows you to assign on of your accounts as the primary (preferred) account.