Billing & Balances

Claim paid top-ups

Verifies the caller's pending top-ups against the payment provider and credits the ones that are confirmed paid. The dashboard calls this automatically on the checkout success redirect, so the balance reflects a payment within seconds even if webhook delivery lags. Idempotent — a top-up is only ever credited once, and only the caller's own top-ups are examined.

post/billing/topups/claim

Request

  • Base URL: https://api.envoisms.ma/v1
  • URL: https://api.envoisms.ma/v1/billing/topups/claim
  • Auth: HTTP bearer

Request body

session_idstring

Checkout session id from the success redirect. Narrows the claim to that checkout.

topup_idstring

Alternatively, a specific top-up id to claim.

Response

Claim outcome and refreshed balances

completedinteger
balance_eurnumber
balance_madnumber

Example response

{
  "claimed": [
    {
      "id": "topup_abcd",
      "status": "completed"
    }
  ],
  "completed": 1,
  "balance_eur": 61.82,
  "balance_mad": 680
}

Changes

No recorded changes to this operation across all 1 revision of this API.