Billing & Balances

Create balance top-up or SMS pack

Creates a custom balance top-up or a prepaid SMS pack. Pack top-ups carry a volume tier, for example sms-1000 unlocks the business SMS price when payment is completed.

post/billing/topups

Request

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

Request body

amount_eurnumber

Required for custom top-ups. Optional when pack_id is provided.

pack_idstring
payment_method'stripe' | 'crypto' | 'bank_transfer'

Example request

{
  "amount_eur": 50,
  "pack_id": "sms-1000",
  "payment_method": "stripe"
}

Response

Pending top-up

idstring
statusstring
amount_eurnumber
amount_madnumber
pack_idstring nullable
sms_countinteger nullable
volume_tierstring nullable
price_per_sms_madnumber nullable
checkout_urlstring uri
instructionsobject

Example response

{
  "id": "topup_abcd",
  "status": "pending",
  "amount_eur": 50,
  "amount_mad": 550,
  "pack_id": "sms-1000",
  "sms_count": 1000,
  "volume_tier": "business",
  "price_per_sms_mad": 0.38
}

Changes

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