Skip to content

[woovi api] [feature proposal] batch charge retrieval through correlationIDs #1041

@scarletquasar

Description

@scarletquasar

Feature Proposal: Batch Charge Retrieval through CorrelationIDs

Context & Current Challenge

We're (Growly Group) currently integrating with your webhook system to retrieve charge status updates. However, we've recently experienced delays—possibly due to temporary unavailability. To ensure resilience, we've implemented a contingency strategy:

  • A scheduled cronjob will scan for charge records.
  • It will check their payment status.
  • It will push them to the idempotency queue, alongside the regular webhook-triggered requests.

This leads to a volume challenge: we expect a high number of charges requiring status checks, and we're concerned about hitting your rate limits with individual requests.

Proposal Overview

We're proposing a new API endpoint to allow batch retrieval of charge statuses using correlation IDs. This will help reduce the number of individual calls, avoiding rate limit issues during peak times.

Feature Concept

  • Endpoint Purpose: Accept a list of correlation IDs and return the status of each charge.
  • Request Payload: A string or array containing multiple charge IDs.
  • Response Structure: Each charge ID mapped to its current status (e.g., paid, pending, failed).
  • Rate Efficiency: Greatly reduces request volume in high-load scenarios.

Example Usage

Request (GET /charges)

correlationIDs=4658afb4-8e0e-4865-a758-dd4f9d6dbf82,c59bac50-b253-4cb3-b56b-71800ec35acc
Image

Disclaimer: I've used an LLM to organize the ideas of that feature proposal.

Tip: concerns about load times and request URL size

If you want, there is a way to avoid long request times through pooling strategy, basically returning a request id (can be an UUID) once a retrieval by batch is requested - it can be a post /charges/batch then retrieving the final result through /charges/batch/{uuid}. It allows passing the desired charges through body and waiting for them to be retrieved and saved in memory to be get in the GET route, it can also have TTL for retrieval after the creation of some hours, maybe 24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions