generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 1
docs(query-payments): rewrite with practical implementation focus and remove AI warning #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aimensahnoun
wants to merge
1
commit into
03-02-docs_api-features_fix_query-requests_openapi_endpoint_links_and_reconciliation_mapping_update_api-features_query-requests.mdx_to_use_the_correct_openapi_deep_links_for_request_status_and_wallet-level_reconciliation._-_replaced_n
Choose a base branch
from
03-02-docs_api-features_rebuild_reconciliation_query_pages_with_correct_v2_endpoints_refactor_query-requests_and_query-payments_docs_to_align_with_actual_api_behavior_and_fix_endpoint_linking_issues_in_openapi_references._-_removed_ai
base: 03-02-docs_api-features_fix_query-requests_openapi_endpoint_links_and_reconciliation_mapping_update_api-features_query-requests.mdx_to_use_the_correct_openapi_deep_links_for_request_status_and_wallet-level_reconciliation._-_replaced_n
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,88 +3,114 @@ title: "Query Payments" | |
| description: "Advanced payment search and filtering with the GET /payments endpoint" | ||
| --- | ||
|
|
||
| <Warning> | ||
| **AI-Generated Content** – This page was generated with AI assistance and may contain inaccuracies. While likely close to accurate, please verify critical details with the [stable documentation](https://docs.request.network) or [contact support](https://github.com/orgs/RequestNetwork/discussions). | ||
| </Warning> | ||
|
|
||
| ## Overview | ||
|
|
||
| The GET /payments endpoint provides comprehensive payment search and filtering capabilities, enabling detailed payment history analysis and transaction monitoring. | ||
| Use [GET /v2/payments](https://api.request.network/open-api/#tag/v2payments/GET/v2/payments) to search payments with filters such as transaction hash, wallet, request identifiers, currency, type, and date range. | ||
|
|
||
| ## Endpoint Features | ||
| This endpoint is designed for wallet-level reconciliation, payment history search, and operational reporting. | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Advanced Filtering" icon="filter"> | ||
| Multiple search criteria | ||
| </Card> | ||
|
|
||
| <Card title="Pagination" icon="list"> | ||
| Large dataset management | ||
| </Card> | ||
| </CardGroup> | ||
| ## Core Endpoint | ||
|
|
||
| - [GET /v2/payments](https://api.request.network/open-api/#tag/v2payments/GET/v2/payments) | ||
|
|
||
| ## How It Works | ||
|
|
||
| ```mermaid | ||
| graph LR | ||
| A[Query Parameters] --> B[Filter Payments] | ||
| B --> C[Sort Results] | ||
| C --> D[Paginate Response] | ||
| D --> E[Return Data] | ||
| ``` | ||
| <Steps> | ||
| <Step title="Provide at least one search parameter"> | ||
| `GET /v2/payments` requires at least one of these filters: | ||
|
|
||
| - `txHash` | ||
| - `walletAddress` | ||
| - `paymentReference` | ||
| - `requestId` | ||
| - `reference` | ||
| - `type` | ||
| - `invoiceCurrency` | ||
| - `paymentCurrency` | ||
|
|
||
| If none are provided, validation fails. | ||
| </Step> | ||
|
|
||
| <Step title="Add optional filters for precision"> | ||
| Optional filters include: | ||
|
|
||
| - `fromDate`, `toDate` (ISO 8601 UTC) | ||
| - `limit`, `offset` | ||
|
|
||
| **Search Process:** | ||
| 1. **Filter:** Apply search criteria | ||
| 2. **Sort:** Order by date, amount, or status | ||
| 3. **Paginate:** Handle large result sets | ||
| 4. **Return:** Structured payment data | ||
| Date ranges are validated (`toDate` must be after or equal to `fromDate`). | ||
| </Step> | ||
|
|
||
| <Step title="Read payments and pagination"> | ||
| The response returns: | ||
|
|
||
| - `payments` array with payment and request-linked metadata | ||
| - `pagination.total` | ||
| - `pagination.limit` | ||
| - `pagination.offset` | ||
| - `pagination.hasMore` | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Filter Options | ||
|
|
||
| ### Basic Filters | ||
| - **Date Range:** Start and end dates | ||
| - **Amount Range:** Minimum and maximum amounts | ||
| - **Currency:** Specific token or fiat currency | ||
| - **Status:** Payment completion state | ||
| ### Identity and Transaction Filters | ||
| - `txHash`: find payments by blockchain transaction hash | ||
| - `walletAddress`: find payments where wallet is payer or payee | ||
| - `paymentReference`: search by payment reference | ||
| - `requestId`: search by specific request ID | ||
| - `reference`: search by merchant reference | ||
|
|
||
| ### Advanced Filters | ||
| - **Payer Address:** Filter by payment sender | ||
| - **Payee Address:** Filter by payment recipient | ||
| - **Transaction Hash:** Specific transaction lookup | ||
| - **Request ID:** Payments for specific requests | ||
| ### Type and Currency Filters | ||
| - `type`: `direct`, `conversion`, `crosschain`, `recurring` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. verify |
||
| - `invoiceCurrency` | ||
| - `paymentCurrency` | ||
|
|
||
| ## Network Filtering | ||
| ### Time and Pagination | ||
| - `fromDate`, `toDate` | ||
| - `limit`, `offset` | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Single Network" icon="link"> | ||
| Payments on specific blockchain | ||
| <Card title="High-precision Search" icon="filter"> | ||
| Combine request, wallet, currency, and date filters for targeted reconciliation queries. | ||
| </Card> | ||
|
|
||
| <Card title="Multi-Network" icon="network-wired"> | ||
| Crosschain payment search | ||
| <Card title="Pagination at Scale" icon="list"> | ||
| Use `limit`/`offset` and `hasMore` to process large result sets safely. | ||
| </Card> | ||
| </CardGroup> | ||
|
|
||
| ### Supported Networks | ||
| Filter payments across Ethereum, Polygon, Arbitrum, BSC, and other supported networks. | ||
|
|
||
| ## Response Data | ||
|
|
||
| ### Payment Information | ||
| - **Basic Details:** Amount, currency, timestamp | ||
| - **Network Data:** Blockchain, transaction hash, block number | ||
| - **Participants:** Payer and payee addresses | ||
| - **Status:** Confirmation state and payment completion | ||
| Common fields include payment-level data and linked request metadata: | ||
|
|
||
| ### Enhanced Data | ||
| - **Fee Breakdowns:** Detailed fee structure with USD amounts | ||
| - **Exchange Rates:** Historical conversion rates | ||
| - **Gas Costs:** Transaction fee information | ||
| - payment identifiers and transaction hashes | ||
| - source/destination network and amounts | ||
| - payment type and currency fields | ||
| - fee objects | ||
| - linked request information (`requestId`, `paymentReference`, `hasBeenPaid`, optional `customerInfo`, `reference`) | ||
|
|
||
| ## Pagination | ||
| ## Practical Notes | ||
|
|
||
| Handle large datasets with cursor-based pagination for optimal performance. | ||
| - Search parameters are combined with AND semantics. | ||
| - Searching by `txHash` or `walletAddress` can return multiple rows from batch transactions. | ||
| - Keep your reconciliation workers idempotent in case the same payment appears across repeated queries. | ||
|
|
||
| ## Related Pages | ||
|
|
||
| <CardGroup cols={3}> | ||
| <Card title="Query Requests" href="/api-features/query-requests"> | ||
| Read request-level status and metadata. | ||
| </Card> | ||
|
|
||
| <Card title="Payment Detection" href="/api-features/payment-detection"> | ||
| Understand automatic detection and payment matching. | ||
| </Card> | ||
|
|
||
| <Card title="Webhooks & Events" href="/api-features/webhooks-events"> | ||
| Build real-time event-driven reconciliation. | ||
| </Card> | ||
| </CardGroup> | ||
|
|
||
| ## Implementation Details | ||
| ## API Reference | ||
|
|
||
| See [API Reference - GET /payments](/api-reference/endpoints/get-payments) for complete technical documentation. | ||
| For full schemas and examples, see [Request Network API Reference](https://api.request.network/open-api). | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description should reference
/v2/paymentsnot/paymentsto match content