SW SwiftWallet
Base URL https://swiftwallet.co.ke/v3

B2B payment

Pay a paybill or till from your payments wallet.

POST /v3/b2b-request-new Send B2B payment Try it

Pays another business. The result arrives by callback.

Scope: b2b_payments

Parameters

FieldInTypeRequiredDescription
amount body integer yes Whole KES. Between 10 and 150000.
Range 10 – 150000
party_b body string yes Destination paybill or till, 5-7 digits.
transaction_type body string yes paybill uses BusinessPayBill, buygoods uses BusinessBuyGoods.
One of: paybill, buygoods
account_reference body string when transaction_type is paybill Paybill account, max 20.
external_reference body string no Your own id, max 100 characters (A-Z, 0-9 and . _ : - /). Reusing one returns 409 DUPLICATE_REFERENCE.
remarks body string no Max 100. Default "B2B Payment".
callback_url body url no Public HTTPS URL for the signed result callback, max 500. Overrides the key's webhook URL for this transaction.

Request

curl -X POST "https://swiftwallet.co.ke/v3/b2b-request-new" \
  -H "Authorization: Bearer $SWIFTWALLET_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"amount":1000,"party_b":"400200","transaction_type":"paybill","account_reference":"INV42"}'

Response fields

success status (INITIATED) message transaction_id reference external_reference livemode identifiers.originatorConversationID identifiers.conversationID identifiers.responseCode identifiers.responseDescription payment_details.amount_sent payment_details.service_fee payment_details.command_id payment_details.remarks payment_details.party_b (masked) payment_details.account_reference wallet_balances.service_wallet_balance wallet_balances.payments_wallet_balance wallet_balances.currency

Requires approved personal KYC (403 PERSONAL_KYC_VERIFICATION_REQUIRED) and an activated wallet channel (403 WALLET_ACTIVATION_REQUIRED).

The amount is debited from the payments wallet and refunded if M-Pesa rejects the payment. The fee comes from the service wallet.