Base Endpoints

All Centiwise API requests are made over HTTPS using the POST method with a JSON body.

Payin (Collection)

Use this endpoint to collect payments from customers.

POST https://gate.centiwise.com/paynet/api/v2/sale-form/{endpoint_id}

Payout (Disbursement)

Use this endpoint to send funds to customer wallets or bank accounts.

POST https://gate.centiwise.com/paynet/api/v4/payout/{endpoint_id}

Path Parameter

ParameterDescription
{endpoint_id}Your unique merchant endpoint ID received from Centiwise

Required Headers

Include these headers on every request:

Content-Type: application/json
Accept: application/json
Authorization: OAuth oauth_consumer_key="...", oauth_nonce="...", oauth_signature="...", oauth_signature_method="RSA-SHA256", oauth_timestamp="...", oauth_version="1.0"

→ See Authentication for how to build the Authorization header.


Full Request Example (Node.js)

const axios  = require('axios');
const crypto = require('crypto');

async function payinRequest(payload) {
  const endpointId = process.env.CENTIWISE_ENDPOINT_ID;
  const url        = `https://gate.centiwise.com/paynet/api/v2/sale-form/${endpointId}`;

  // 1. Add control hash to payload
  payload.control = buildControlHash(
    payload.client_orderid,
    payload.amount,
    payload.currency
  );

  // 2. Build OAuth header
  const authHeader = buildOAuthHeader('POST', url, payload, privateKey);

  // 3. Send request
  const response = await axios.post(url, payload, {
    headers: {
      'Content-Type':  'application/json',
      'Accept':        'application/json',
      'Authorization': authHeader,
    },
    timeout: 60000,
  });

  return response.data;
}

Notes

  • Always set a read timeout of at least 60 seconds — mobile-money providers can be slow
  • Set a connect timeout of 30 seconds
  • Both endpoints return JSON in the response body regardless of success or error
  • Check the status field in the response body — do not rely solely on the HTTP status code


Did this page help you?