Update an account under a specific customer
The PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier}
endpoint allows you to update details of an existing account under a specific customer. This is useful when you need to make changes such as renaming an account, correcting identifiers, or updating metadata to reflect changes in how the account is used. Keeping account information up to date ensures accurate reporting, easier account management, and better alignment with evolving business needs.
Use case
Acme Wellness manages multiple accounts for its client, Zanzibar Health Group. One of the accounts originally created for a short-term campaign is now being extended into a year-round program. To reflect this change, Acme decides to update the account’s display name to adjust its metadata accordingly. Using this endpoint, Acme can update the account without needing to create a new one, preserving its transaction history while aligning it with the new program scope.
Use the following endpoint to update an account under a specific customer:
Endpoint | Purpose |
---|---|
PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier} | Update an account under a specific customer on this platform. |
The following path parameters are used with this endpoint:
Path params | Data type | Description |
---|---|---|
customerIdentifier | string | (Required) A unique identifier for the customer under which you are creating a new account. The string must have 5-100 characters. |
accountIdentifier | string | The accountIdentifier for the account you are updating. |
The following body parameters are used with this endpoint:
Body params | Data type | Description |
---|---|---|
displayName | string | (Optional) Update the friendly name for this account. The string must be between 5-100 characters. Emojis are not accepted for displayName or any text entry. |
contactEmail | string | (Optional) Update the designated representative email address for this account. The string may have up to 100 characters. |
fundingNotification | array of objects | (Optional) Update the funding notification email address(es). |
- emailAddress | string | (Required when using fundingNotification ) Update or add email addresses for funding notifications on this account. A provided list replaces the existing list, an empty list clears all existing emails, and a null/omitted value leaves the list unchanged. |
The following payload is an example for when you use PATCH {URI}/customers/{customerIdentifier}/accounts/{accountIdentifier}
:
{
"currentBalance": 0,
"contactEmail": "string",
"fundingNotification": [
{
"emailAddress": "string"
}
],
"accountIdentifier": "string",
"accountNumber": "string",
"displayName": "string",
"createdAt": "2024-03-14T16:18:41.061Z",
"status": "string",
"currencyCode": "string"
}
Here's an example payload for when you receive an error:
{
"timestamp": "2025-02-21T23:23:13.930Z",
"requestId": "string",
"path": "string",
"httpCode": 0,
"httpPhrase": "string",
"i18nKey": "string",
"message": "The error message will show here for error codes ",
"errors": [
{}
]
}
The possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:
Response code | Meaning |
---|---|
200 | The request was successful. |
400 | The server could not understand the request due to invalid syntax. |
401 | Authentication is required and has either not been provided or failed. |
403 | The server understood the request but refuses to authorize it. |
404 | The server could not find the requested resource. In other words, the URL you’re trying to access doesn’t point to anything that exists on the server. |
500 | Something went wrong on the server, but the server cannot be more specific about what the exact problem is. |
503 | The server is currently unable to handle the request due to temporary overload or maintenance. |
Updated 15 days ago