Your customer will then add their card information, including: Full Name, Card Number, Expiration Date, CVV, and Nickname. On submission of the form, you will need to handle the error or response which is triggered by the JavaScript callback. The callback function (err, res) allows you to determine if there is an error with the request (e.g. card expiration invalid) or if the response was successful.
If there is an error, display the error to the user to have them correct any fields and have them re-attempt to add their card by restarting the add a debit card flow.
Code | Message |
---|---|
FastFundsIneligible | The card is ineligible for Fast Funds. |
PushToCardIneligible | The card is ineligible for push-to-card. |
InvalidAddress | The address is invalid. Note: This error is thrown when the address entered is different from the one that the card was issued with. For example, if you originally used the format XXXXX:XXXX for the zip code, entering just the 5 digits into the card form will trigger this error. |
InvalidCardNumber | The card number is invalid. |
InvalidCardType | Invalid card type. Only debit cards are supported. |
InvalidCvvOrExpiration | The CVV or expiration date is invalid. |
InvalidToken | The token is invalid. |
InvalidVisaActionCode | The card could not be verified. |
SuspectedFraud | The card may be lost or stolen. |
DuplicateResource | Card already exists. |
MaxNumberOfResources | The maximum number of cards have been added. |
{
"error": {
"code": "ValidationError",
"message": "Validation error(s) present. See embedded errors list for more details.",
"_embedded": {
"errors": [
{
"code": "Invalid",
"message": "Card expiration invalid.",
"path": "/cardExpiration"
}
]
}
}
}
{
"code": "DuplicateResource",
"message": "Card already exists: id=a67d47f0-73de-4a6c-8de4-105d30aad395",
"_links": {
"about": {
"href": "",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
}
}
}
{
"code": "MaxNumberOfResources",
"message": "The maximum number of cards have been added.",
}
If successful, you will receive a JSON response that includes a link to the newly attached funding source.
{
"error": null,
"response": {
"_links": {
"funding-source": {
"href": "https://api-sandbox.dwolla.com/funding-sources/746d5c93-acb9-4826-a9c1-78ecf16401a6"
}
}
}
}
Use sandbox environment to test API requests.
All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.