Forward API
Hyperwallet Integration
Hyperwallet provides an API that you can use to interact with their service. The Forward API can be used to interact with the Bank Card Create and Bank Card Update parts of this API.
Naming & Environment Alignment
Braintree Env | Hyperwallet Env | Config Name |
---|---|---|
Sandbox | Sandbox | hyperwallet_sandbox |
Sandbox | UAT | hyperwallet_integration |
Production | Production | hyperwallet_integration |
Example
Example create request (sandbox)
- bash
curl https://forwarding.sandbox.braintreegateway.com/ -H "Content-Type: application/json" -X POST -u "${BRAINTREE_PUBLIC_KEY}:${BRAINTREE_PRIVATE_KEY}" -d '{
"merchant_id": "'"$BRAINTREE_MERCHANT_ID"'",
"payment_method_nonce": "fake-valid-nonce",
"name": "hyperwallet_sandbox",
"url": "https://api.sandbox.hyperwallet.com/rest/v4/users/'"$HYPERWALLET_USER_TOKEN"'/bank-cards/",
"method": "POST",
"data": {
"transferMethodCountry": "US",
"transferMethodCurrency": "USD"
},
"sensitive_data": {
"user": "'"$HYPERWALLET_USER"'",
"password": "'"$HYPERWALLET_PW"'",
"cvv": "123",
"number": "4622943126011056"
}
}'
Response Body
- JSON
{
"token": "trm-62c28319-yyyy-4386-973d-cab385d9212a",
"type": "BANK_CARD",
"status": "ACTIVATED",
"createdOn": "2022-10-07T17:30:40",
"transferMethodCountry": "US",
"transferMethodCurrency": "USD",
"bankName": "INTL HDQTRS-CENTER OWNED",
"cardType": "DEBIT",
"cardNumber": "****1056",
"cardBrand": "VISA",
"dateOfExpiry": "2027-12",
"userToken": "usr-69662d54-xxxx-48a3-922a-ec907fd58673",
"processingTime": "30 minutes",
"links": [
{
"params": {
"rel": "self"
},
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-69662d54-xxxx-48a3-922a-ec907fd58673/bank-cards/trm-62c28319-yyyy-4386-973d-cab385d9212a"
}
]
}
Example update request
- bash
curl https://forwarding.sandbox.braintreegateway.com/ -H "Content-Type: application/json" -X POST -u "${BRAINTREE_PUBLIC_KEY}:${BRAINTREE_PRIVATE_KEY}" -d '{
"merchant_id": "'"$BRAINTREE_MERCHANT_ID"'",
"payment_method_nonce": "fake-valid-nonce",
"name": "hyperwallet_sandbox",
"url": "https://api.sandbox.hyperwallet.com/rest/v4/users/'"$HYPERWALLET_USER_TOKEN"'/bank-cards/'"$HYPERWALLET_INST_TOKEN"'",
"method": "PUT",
"sensitive_data": {
"user": "'"$HYPERWALLET_USER"'",
"password": "'"$HYPERWALLET_PW"'",
"cvv": "123",
"number": "4895142232120006"
}
}'
Common Issues
- JSON
{
"error": "Request URL does not match config URL regex",
"message": {
"config_regex": "^https://api.sandbox.hyperwallet.com/rest/v4/users/.*/bank-cards/.*$",
"request_urls": [
"https://api.sandbox.hyperwallet.com/rest/v4/users/usr-cedff10f-xxxx-42e5-bdf7-2f3abba7a817/bank-cards"
],
"validation_error?": true
},
"request-uuid": "b6e56079-c93b-4efe-8ca5-6d4211097d4d"
}
Make sure bank cards have a trailing slash, the correct version is being used, and the URL is appropriate to the environment.
- JSON
{
"message ": "The bank account information provided is not configured for your program. ",
"code ": "EXTERNAL_ACCOUNT_TYPE_NOT_SUPPORTED "
}
This error displays when "transferMethodCountry" is not US.
- JSON
{
"message": "The request cannot be processed - Please contact our support team for the assistance.",
"code": "VISADIRECT_ERROR_107"
}
Hyperwallet does not accept the traditional test values Braintree has setup for payment_method_nonce
. For sandbox, you can use the test values noted earlier in this document. For UAT, you need to work with your onboarding helper to receive nonce-tokens that represent vaulted debit cards that are then loaded by Forward API and sent to Hyperwallet.
Next Page: Stripe →