Test and production
Keys and bank tokens are environment-specific. Keep their configuration, credentials, webhook endpoint, and reconciliation data separate.
DWELLO PAYMENTS API
Create Canadian payment requests, track the result, and receive a compact webhook when a payment completes or is cancelled.
https://paymentsapi.dwello.com/apiX-API-KEYapplication/jsonAuthentication
Generate separate keys in the Payments portal for test and production. A key identifies the account whose bank tokens and requests the API can access. Send it only from a server-side integration over HTTPS.
X-API-KEY: DP-your-api-keyNever place a key in browser JavaScript, a mobile application, source control, or client-visible logs. Revoke and replace a key if it may have been exposed.Keys and bank tokens are environment-specific. Keep their configuration, credentials, webhook endpoint, and reconciliation data separate.
Persist a unique token for each create operation. Reuse that same token only when retrying that same business request.
POST /api/Request/Create
The request is created for the account represented by the API key and is processed through the payment workflow. A successful create returns a request GUID. Store it with your own reference number; a successful create does not itself mean that funds have been received.
/api/Request/CreateAPI key requiredcurl --request POST "https://paymentsapi.dwello.com/api/Request/Create" \
--header "Content-Type: application/json" \
--header "X-API-KEY: DP-your-api-key" \
--data '{
"referenceNumber": "invoice-1042",
"debtorFirstName": "Avery",
"debtorLastName": "Martin",
"debtorEmailAddress": "avery@example.ca",
"bankToken": "your-verified-bank-token",
"languagePreference": "en",
"endCreditorName": "Example Company Inc.",
"amount": 125.00,
"emailBody": "Payment for invoice 1042.",
"idempotencyToken": "invoice-1042"
}'using var request = new HttpRequestMessage(
HttpMethod.Post,
"https://paymentsapi.dwello.com/api/Request/Create");
request.Headers.Add("X-API-KEY", apiKey);
request.Content = JsonContent.Create(new {
referenceNumber = "invoice-1042",
debtorFirstName = "Avery",
debtorLastName = "Martin",
debtorEmailAddress = "avery@example.ca",
bankToken,
languagePreference = "en",
endCreditorName = "Example Company Inc.",
amount = 125.00,
emailBody = "Payment for invoice 1042.",
idempotencyToken = "invoice-1042"
});
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();const response = await fetch(
"https://paymentsapi.dwello.com/api/Request/Create",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": process.env.DWELLO_API_KEY
},
body: JSON.stringify({
referenceNumber: "invoice-1042",
debtorFirstName: "Avery",
debtorLastName: "Martin",
debtorEmailAddress: "avery@example.ca",
bankToken: process.env.DWELLO_BANK_TOKEN,
languagePreference: "en",
endCreditorName: "Example Company Inc.",
amount: 125.00,
emailBody: "Payment for invoice 1042.",
idempotencyToken: "invoice-1042"
})
}
);
if (!response.ok) throw new Error(await response.text());
const { requestID } = await response.json();| Field | Type | Required | Rules and behaviour |
|---|---|---|---|
referenceNumber | string | Yes | Up to 50 characters. No field-specific character filter is applied. Prefer letters, digits, hyphens or underscores for portable identifiers. Returned in webhooks and retrieval responses. |
debtorFirstName | string | Yes | Up to 30 characters. English/French letters, spaces and permitted punctuation; follow the payment-text rules below. |
debtorLastName | string | Yes | Up to 50 characters. English/French letters, spaces and permitted punctuation; follow the payment-text rules below. Provide with the debtor identity. |
debtorEmailAddress | string | One contact method | 5–60 characters. Use an ASCII email address with one @ and a dotted domain; no accents, commas or spaces. Provide either this field or debtorMobilePhoneNumber, not both. |
debtorMobilePhoneNumber | string | One contact method | Exactly 10 ASCII digits (0–9), including area code. No country code, +, spaces, parentheses or hyphens. Provide either this field or debtorEmailAddress, not both. |
creditorEmailAddress | string | No | 5–60 characters when supplied; the same ASCII email rules as debtorEmailAddress. This is the creditor/requestor notification address. If omitted, the API uses the authenticated user's email; do not copy the debtor email unless intentional. |
bankToken | string | Yes | Copy the issued token unchanged: 32 lowercase hexadecimal characters (0–9, a–f), without GUID hyphens. Must identify an active, verified deposit bank belonging to the API-key account. |
languagePreference | string | No | Two letters: en or fr (English/French). Use lowercase for bank compatibility; default is en. |
requestDate | ISO 8601 datetime | No | ISO 8601 datetime with an explicit UTC Z, for example 2026-09-09T16:05:00Z. Defaults to current UTC time. Do not label local time as UTC. |
endCreditorName | string | Yes | Up to 50 characters (storage limit). Individual/company name shown to the payer; follow the payment-text rules below. |
reminderFrequency | integer | No | From 1 to 5. Defaults to 5. |
reminderCount | integer | No | From 1 to 5. Defaults to 5. |
amount | number | Yes | Positive CAD amount, at most 10000.00 under the supplied Bulk Request guide, with at most two decimal places. Send a JSON number using a decimal point; no currency sign or thousands separators. These limits are enforced by the API. Amount must also exceed the authenticated account's plan fee plus applicable tax from the account province's configured tax rate; equal or lower amounts return an Amount validation error before creation. Percentage-based plans use the requested amount to calculate the fee. If the account province or tax configuration is missing, 0% tax is used. |
emailBody | string | No | Up to 420 characters, exported in up to three 140-character memo elements. Use the payment-text rules and bank-compatible memo punctuation below. Omit, send null or an empty string when no memo is needed. |
idempotencyToken | string | No | Maximum 50 characters; no dedicated character filter is applied. Prefer letters, digits, hyphens or underscores (a GUID is suitable). Reuse the exact value for the same business request. Duplicate tokens for the same account are rejected, rather than returning the original success response. |
debtorFirstName, debtorLastName, endCreditorName and emailBody, use plain text with English/French letters, digits and spaces. Send actual accented characters in UTF-8 JSON, not HTML entities. Limits include spaces and punctuation.
The API rejects these characters: < > % { } [ ] & # \ ". It also rejects the substrings http:, https:, javascript, function, return and www, case-insensitively, even inside a longer word.
For bank-compatible memos, use these supported punctuation characters: . ! @ / ; : , ' $ = ^ ? * ( ), plus French characters. Line breaks are allowed in the bank memo format. Emoji, smart quotes, em/en dashes and hyphens are rejected in memos; use a space or colon instead. Names allow ordinary hyphens.
The API enforces these lengths and character rules and returns field-specific validation errors. Supply both debtor name fields and exactly one debtor contact method. Names and memos accept ASCII letters and digits, the French accented letters À Â Æ Ç É È Ê Ë Î Ï Ô Œ Ù Û Ü Ÿ (and lowercase equivalents), spaces and the punctuation listed above. Names also allow hyphens; memos allow CR/LF line breaks. Other characters, including tabs, are rejected. A valid request still requires an active, verified bank belonging to your account.
200 response
{
"requestID": "1f3da3f9-6bb1-46d9-9e2a-3846b877965e"
}Request management
Retrieve one request owned by the authenticated account, including its current status, dates, and associated credit records.
GET /api/Request/1f3da3f9-6bb1-46d9-9e2a-3846b877965eRetrieve requests whose processing date is within the supplied range. Dates should be sent as ISO 8601 datetimes.
{ "fromDate": "2026-08-01T00:00:00Z", "toDate": "2026-08-31T23:59:59Z" }Cancel a request by sending its request GUID as a JSON string. The request must still be eligible for cancellation; completed requests cannot be cancelled.
"1f3da3f9-6bb1-46d9-9e2a-3846b877965e"/api/Request/{RequestID}API key requiredcurl --request GET "https://paymentsapi.dwello.com/api/Request/1f3da3f9-6bb1-46d9-9e2a-3846b877965e" \
--header "X-API-KEY: DP-your-api-key"200 response
{
"FirstName": "Avery", "LastName": "Martin",
"FromEmail": "avery@example.ca", "ToEmail": "billing@example.ca",
"Status": "Requested", "Amount": 125.00,
"ProcessDate": "2026-08-05T09:30:00",
"RequestID": "1f3da3f9-6bb1-46d9-9e2a-3846b877965e",
"ReferenceNumber": "invoice-1042", "Credits": []
}/api/Request/GetByDateRangeAPI key requiredcurl --request POST "https://paymentsapi.dwello.com/api/Request/GetByDateRange" \
--header "Content-Type: application/json" \
--header "X-API-KEY: DP-your-api-key" \
--data '{
"fromDate": "2026-08-01T00:00:00",
"toDate": "2026-08-31T23:59:59"
}'FromDate and ToDate are inclusive process-date boundaries. The API returns 404 when no owned requests fall in the range.
200 response
[
{
"FirstName": "Avery", "LastName": "Martin",
"Status": "Completed", "Amount": 125.00,
"RequestID": "1f3da3f9-6bb1-46d9-9e2a-3846b877965e",
"ReferenceNumber": "invoice-1042",
"Credits": [{ "TransactionGUID": "d1b1f9ae-7a12-41c9-a6e4-7f1eb1139ad8", "Amount": 122.10, "ProcessDate": "2026-08-06T00:00:00" }]
}
]/api/Request/DeleteAPI key requiredcurl --request DELETE "https://paymentsapi.dwello.com/api/Request/Delete" \
--header "Content-Type: application/json" \
--header "X-API-KEY: DP-your-api-key" \
--data '"1f3da3f9-6bb1-46d9-9e2a-3846b877965e"'The DELETE body is a JSON string containing the request GUID, not an object. The API cancels only an owned request in an eligible status; otherwise it returns 404.
200 response
{
"FirstName": "Avery", "LastName": "Martin",
"Status": "UserCancelled", "Amount": 125.00,
"CancellationDate": "2026-08-05T10:14:22.000",
"RequestID": "1f3da3f9-6bb1-46d9-9e2a-3846b877965e",
"ReferenceNumber": "invoice-1042", "Credits": []
}Responses include debtor and creditor fields, bank token, status, requested/process/export/paid/cancellation dates, reference number, and any related credit transactions.
Persist the request GUID and your reference number. Reconcile completed or cancelled results from request retrieval and webhooks; do not assume a create response represents completed payment.
Payment webhooks
Configure one payment webhook URL for an account in the Payments portal. Dwello sends an HTTP POST with JSON when the current processing flow identifies a completed payment or a user-cancelled payment. Use the webhook to prompt reconciliation, then retrieve the request when your workflow requires the complete record.
Content-Type: application/json. A 2xx response is accepted; a non-2xx response is considered unsuccessful. Failed deliveries receive up to five retries after the initial attempt, with delays of 1, 2, 4, 8, and 16 seconds. Retries reuse the same payload and stop on a 2xx response. These in-process retries do not survive a service restart, and there is no signed webhook header; receivers must be idempotent and reconcile with the API.{
"RequestID": "1f3da3f9-6bb1-46d9-9e2a-3846b877965e",
"ReferenceNumber": "invoice-1042",
"Date": "2026-08-03T15:42:18.247-04:00",
"Status": "Completed",
"Amount": 125.00
}RequestIDGUID identifying the original payment request. Use this as the idempotency and retrieval key.ReferenceNumberYour original business reference from the create request.DateTimestamp generated when Dwello prepares the notification.StatusString enum name for the request status. Current delivery flows send Completed or UserCancelled.AmountOriginal requested amount in CAD. It is not a fee-adjusted settlement amount.Parse and validate JSON. Treat the body as a notification, not an authorization to change unrelated records.
Deduplicate by RequestID and status. A receiver should tolerate repeated notifications safely.
Return 2xx promptly. Put longer reconciliation work on your queue so the HTTP response stays fast.
Retrieve and reconcile. Use GET /api/Request/{RequestID} before finalizing material business actions.
Request statuses
The API returns a status in its request response. This table shows the customer-facing lifecycle in the same order as the Payments portal. Only the two terminal events listed as “currently delivered” are emitted by the current payment webhook flow.
| Status | Meaning | Webhook delivery |
|---|---|---|
| New | The request was created and has not yet been sent to Interac. It can be cancelled in the Payments portal only while it remains New. | Not currently delivered |
| Requested | The Interac request was sent and awaits customer action. | Not currently delivered |
| Processing | The payment job has picked up the request and is advancing it through the request workflow. | Not currently delivered |
| Completed | The payment was confirmed as completed. | Currently delivered |
| Timed out | The request was not fulfilled before its processing window ended. | Not currently delivered |
| Cancelled | The request was cancelled. Webhook notifications use UserCancelled for the currently delivered cancellation event. | Currently delivered |
Errors and operations
Record request IDs, reference numbers, response codes, and retry decisions. Do not log API keys, bank tokens, full webhook bodies, or sensitive customer information.
Use the integration guide for launch steps, or contact Dwello support with the request ID and approximate timestamp.