GoDigital
GoDigital Payments API

Collections (C2B)

Server

Ask a customer to approve a payment on their phone with a USSD push. The final outcome is delivered asynchronously to your callback URL.


Create C2B push collection

POST
https://api-sandbox.godigital.tz/api/v1
/payments/collections/push
Bearer (JWT)

Sends a USSD push to the customer's phone asking them to approve a payment. The customer approves or rejects the request on their handset.

The response only confirms the push was accepted for processing (transactionStatus: ROUTED). Wait for the callback or query the transaction for the final result.

On final success, the provider collection wallet is credited and your total balances are updated.

Create C2B push collection › Headers

X-Client-Id
​string · required

Client identifier issued during onboarding.

X-Request-Id
​string · uuid · required

Unique identifier for this request, used for traceability. A UUID is recommended.

X-Idempotency-Key
​string · required

Unique key for this operation. Sending the same key with the same body returns the original result. Reusing a key with a different body is rejected (PGW-1004).

X-Timestamp
​string · pattern: ^[0-9]{10}$ · required

Current time as a 10-digit Unix epoch timestamp in seconds.

X-Nonce
​string · required

Unique random value for every request, used to prevent replay attacks.

X-Content-SHA256
​string · required

SHA-256 hash of the raw request body, Base64-encoded. For requests without a body, hash the empty string (47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=).

X-Signature
​string

Optional Base64-encoded HMAC-SHA256 request signature. Only validated when signing was enabled for your integration during onboarding.

Create C2B push collection › Request Body

requestId
​string · required

Your unique identifier for this request. Generate a new one for every payment.

merchantId
​string · required

Merchant identifier issued during onboarding.

providerCode
​ProviderCode · enum · required

Mobile network wallet tree the request is posted to.

Enum values:
YAS
YAS (formerly Tigo) wallet tree
VODACOM
Vodacom M-Pesa wallet tree
AIRTEL
Airtel Money wallet tree
HALOTEL
Halopesa wallet tree
amount
​number · required

Amount to move. Must be greater than zero and within your merchant limits. No thousands separators.

currency
​string · required

Transaction currency.

Default: TZS
msisdn
​string · pattern: ^255[0-9]{9}$ · required

Customer mobile number in international format, starting with 255.

reference
​string · required

Your business reference, such as an invoice, order or payout number. Use one per payment.

callbackUrl
​string · uri

HTTPS endpoint that receives the final result. Optional if a callback URL is configured on your merchant profile; the request value overrides it only if allowed by policy.

narration
​string

Optional note or payment description.

Create C2B push collection › Responses

Collection request accepted and routed to the provider.

Every response uses this envelope.
status
​string · enum · required

Whether the API call itself was processed. For the payment outcome, read data.transactionStatus.

Enum values:
SUCCESS
FAILED
code
​string · required

Result code. PGW-0000 means success.

message
​string · required
requestId
​string

Echo of your request identifier.

timestamp
​string · date-time

ISO-8601 timestamp with timezone.

Endpoint-specific payload. null on errors.