---
title: "Claim paid top-ups"
method: POST
path: "/billing/topups/claim"
tags: ["Billing & Balances"]
---

# Claim paid top-ups

`POST /billing/topups/claim`

## Request

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

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.

## Request body

- object
  - `session_id` string: Checkout session id from the success redirect. Narrows the claim to that checkout.
  - `topup_id` string: Alternatively, a specific top-up id to claim.

## Response `200`

Claim outcome and refreshed balances

- object
  - `claimed` object[]
    - `id` string
    - `status` string
  - `completed` integer
  - `balance_eur` number
  - `balance_mad` number

---

[API](https://skmtc.dev/envoisms/apis/envoisms-ma-api.md) · [All operations](https://skmtc.dev/envoisms/apis/envoisms-ma-api/llms.txt) · [OpenAPI document](https://skmtc.dev/envoisms/apis/envoisms-ma-api/revisions/662db074bd86?raw)
