method set to card. You do not send a phone number. The API returns a redirect_url; you send the customer to that URL to complete payment on the card gateway. After payment, the customer can be returned to your callback_url, and you receive a server-to-server webhook with the result.
Flow
1
Initialize collection
POST to
/api/v1/collect-money with method: card, amount, country, and a unique reference.2
Get redirect URL
The API returns a
redirect_url (e.g. https://wallet.wearemarz.com/pay/card-gateway?reference=...).3
Send customer to gateway
Open
redirect_url in the browser (same tab, new tab, or redirect). Use the exact URL returned by the API - do not modify or build it yourself.4
Customer pays
The customer completes payment on the card gateway.
5
Receive result
The customer is redirected to your
callback_url, and you receive a webhook with the transaction result.Create a card collection
EndpointPOST https://wallet.wearemarz.com/api/v1/collect-money
Authentication is HTTP Basic: Authorization: Basic base64(api_key:api_secret).
Request parameters (card)
Do not send
phone_number for card payments.
Example request
- Tab Title
- Tab Title
Requirements
Active subscription
Your business must have an active Card Payments subscription (for the country, e.g. UG, or GLOBAL).
Unique reference
Use a unique UUID reference for each collection.
Redirect URL
Use the
redirect_url from the response as-is.Card wallet
Card payment collections are credited to a separate card wallet (card_balance), not the main wallet. Every business has two wallets:
Withdrawing card wallet funds
Card wallet funds can be withdrawn via bank transfer. Passwallet_source = card when creating a bank transfer:
Balance API
TheGET /api/v1/balance endpoint returns both wallets:
Callbacks & webhooks
Card payments use the same callback and webhook format as other collections. The customer can be redirected to yourcallback_url after payment. Your server also receives a POST webhook with the transaction result - same structure as collections, with provider set to card payments and phone_number possibly null.
For the exact callback payload and examples (completed/failed), see the Webhooks documentation.
Card payments use the same callback format as other collections. See Webhooks for the signing headers (
X-MarzPay-Timestamp, X-MarzPay-Signature) and verification steps.
