Update errors, pagination and webhooks documentation - #251
Open
ricardobcl wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This documentation-only PR aligns the Errors, Pagination, and Webhooks API reference with current platform behavior.
Changes:
- Adds error statuses and response formats.
- Clarifies pagination responses and limits.
- Documents webhook signing, payloads, filtering, and statuses.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Summary |
|---|---|
_webhooks.md |
Clarifies signatures, payloads, delivery scoping, and event statuses. |
_pagination.md |
Documents pagination headers, status codes, and limits. |
_errors.md |
Adds error statuses and response-body formats. |
Suppressed comments (3)
_webhooks.md:103
- This sentence still says that creating a transaction returns
processingunconditionally, but the create/commit documentation states that the create/prepare endpoint returnspendingand only commit (or?commit=true) changes it toprocessing(_transactions.md:150,192). Please distinguish the prepare and commit paths here so consumers do not miss the initialpendingstatus.
When you create a transaction, the first set of validations is run and you'll get an error if the transaction request is not valid. Otherwise, the request is completed successfully and the response body will contain a `status` property with value `processing`. In the meantime, we perform another set of validations that can lead to a transaction's `status` becoming `failed` or `completed`. This asynchronous behavior can be handled by subscribing to a webhook with the "Transaction Status Updated" scope, which will allow you to receive updates whenever a transaction changes its `status`.
_webhooks.md:23
- The comma before “that” makes this newly edited sentence grammatically incorrect. Remove it so the relative clause is attached to the
Signatureheader correctly.
In addition, the request also includes a `Signature` header, that can be used to verify that the request body has not been tampered with.
_webhooks.md:128
- This new table entry says every status transition is forwarded, but the preceding paragraph still describes the asynchronous status change as only becoming
failedorcompleted. That contradiction leaves readers unsure whether transitions such ascancelled,on-hold, orwaitingare actually delivered; update the preceding description to say that forwarded updates cover any transition.
| | Any status change is forwarded. Statuses include: `cancelled`, `completed`, `failed`, `on-hold`, `processing` and `waiting`.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
| ``` | ||
|
|
||
| Validation errors return the `validation_failed` code and an `errors` object keyed by field, where each field holds a list of errors, each with its own `code` and `message`. |
| The maximum number of items per page is 50. | ||
| That is also the default value if you leave it unspecified. | ||
| For most endpoints, the maximum number of items per page is 50, which is also the default value if you leave it unspecified. | ||
| Some endpoints, such as the list of assets, allow larger pages. |
| That header is generated by signing the request body with the previously provided secret, using the SHA512 algorithm. | ||
| In addition, the request also includes a `Signature` header, that can be used to verify that the request body has not been tampered with. | ||
| Its value is the HMAC-SHA512 of the JSON-serialized request body, computed with the previously provided secret, hex-encoded and prefixed with `sha512=`. | ||
| To verify a request, compute the HMAC-SHA512 of the raw request body using the shared secret, and compare `sha512=` followed by the resulting hex digest against the `Signature` header. |
ricardobcl
force-pushed
the
support/update-errors-pagination-webhooks-documentation
branch
from
August 23, 2026 22:36
14cdd90 to
960af42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes drift between the Errors, Pagination and Webhooks pages and the current behavior of the platform, verified against
uphold/backendmaster anduphold/event-dispatchermaster._errors.md410 Gone,422 Unprocessable Entityand423 Lockedto the status table — all verified as actually emitted by the API.415was deliberately left out: the error class exists but has no callers.{ "code": "<snake_cased_status>", "message": "<status name>" }) and validation errors ({ "code": "validation_failed", "errors": { ... } })._pagination.mdAccept-Ranges: itemsheader — integrators checking for 200 would be surprised._webhooks.mdSignature) and specified the actual scheme: HMAC-SHA512 of the JSON-serialized body with the shared secret, hex-encoded, prefixed withsha512=— previously described only as "signing with the SHA512 algorithm", which is not enough to verify a delivery. Added a verification hint.cancelled,completed,failed,on-hold,processing,waiting).idplus context, not full card details; added a pointer to the Get Card Details endpoint.Notes for reviewers
uphold/event-dispatchermaster (crypto-util.js,webhook-dispatcher/app.js, the event handlers andsubscription-manager.js).Related issues
Follow-up to #250 (documentation audit against
uphold/backendmaster).Impacted areas
Errors, Pagination and Webhooks pages of the API reference.
Steps to reproduce or test
Development
Every claim was traced to the enforcing code in
uphold/backendmaster (error mappers, koa-pagination middleware and controller overrides) anduphold/event-dispatchermaster (signing and dispatch paths).QA
Render the three pages; optionally verify a paginated endpoint returns 206 +
Accept-Ranges: itemsand that a webhook delivery'sSignatureheader validates with the documented HMAC-SHA512 scheme.Checklist
Breaking Changeif it applies.package.json.Deploy notes
N/A — no files added or removed, so no slate index changes are needed.
🤖 Generated with Claude Code