Retrieve All Scheduled Invoices

Finds and lists all scheduled invoices under a merchant's account.

Retrieves a list of all scheduled invoices for a merchant's account. This endpoint allows merchants to manage their scheduled invoices effectively and provides flexibility with sorting and filtering options.


Key Features

  • Returns all scheduled invoices associated with a merchant account.
  • Provides default sorting by created_at in descending order (newest first).
  • Enables filtering and ordering based on various parameters.
  • Supports pagination for handling large datasets.

Usage Notes

Sorting and Filtering

  • Default Sorting: Results are sorted by created_at in descending order.
  • Custom Sorting: Use query parameters to sort by other fields, such as next_run_at or status.
  • Filtering: Include parameters like status (e.g., active, paused, deleted) or customer-specific identifiers to refine the results.

Pagination

  • Paginate results using the page and limit parameters.
  • Example: ?page=1&limit=50 retrieves the first 50 scheduled invoices.

Lifecycle Actions

  • Scheduled invoices can be:
    • Created using POST /invoice/schedule.
    • Updated using PUT /invoice/schedule/{id}.
    • Deleted using DELETE /invoice/schedule/{id}.

Additional Parameters

Sort ParameterDescriptionExample Query
last_run_atSorts by the most recent time the schedule was run.?sort=last_run_at&order=DESC (latest first)
next_run_atSorts by the next scheduled run time.?sort=next_run_at&order=ASC (earliest first)
countSorts numerically by the total number of runs.?sort=count&order=DESC (highest first)
created_atSorts by the creation time of the schedule.?sort=created_at&order=ASC (oldest first)
updated_atSorts by the last time the schedule was updated.?sort=updated_at&order=DESC (most recent first)

Additional Notes

  • Use the order parameter to define the sorting direction:
    • DESC: Descending order (e.g., newest, latest, highest).
    • ASC: Ascending order (e.g., oldest, earliest, lowest).

Response Structure

CodeResponseReason
200SuccessReturns a paginated list of scheduled invoices.
400Bad RequestInvalid query parameters or missing required fields.
401UnauthorizedAuthentication failed.
500Internal Server ErrorUnexpected server error.

Important Considerations

  • Schedule Management: Use this endpoint to monitor and manage active, paused, or deleted schedules.
  • Deleted Schedules: Scheduled invoices marked as deleted will not generate new invoices.
  • Pagination Best Practices: For large datasets, implement pagination to ensure optimal performance and usability.
  • Audit Trail: Scheduled invoices include timestamps and metadata for tracking purposes. Use this information to reconcile or audit scheduled billing activities.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!