To create a new entry on a Label Ledger you’ll specify the ID of the Label, as well as a positive or negative amount value (depending on if the purpose is to increase or decrease the amount tied to a Label). The amount tied to a Label cannot go negative, therefore if the amount of the label ledger entry exceeds the current amount tied to a Label then a validation error will be returned.
POST https://api.dwolla.com/labels/{id}/ledger-entries
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var labelUrl =
"https://api-sandbox.dwolla.com/labels/e217bcac-628a-456d-a375-6cc51230616f";
var requestBody = {
amount: {
currency: "USD",
value: "-5.00",
},
};
dwolla
.post(`${labelUrl}/ledger-entries`, requestBody)
.then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/ledger-entries/76e5541d-18f4-e811-8112-e8dd3bececa8'
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.