Accept PaymentsInitialize Payment With Wallet

Initialize Payment With Wallet

This endpoint initializes a standard checkout payment and settles the successful payment into a specific NGN wallet using wallet_code. This is only for merchants enabled for multiple NGN wallets.

Endpoint

POST https://backendapi.sayswitchgroup.com/api/v1/transaction/initialize/wallet

Headers

Authorization: Bearer YOUR_SECRET_KEY
Content-Type: application/json

Request Body

{
  "email": "customer@example.com",
  "amount": "5000",
  "currency": "NGN",
  "wallet_code": "NGN169XXXX",
  "callback": "https://merchantwebsite.com/callback",
  "reference": "MW_PAYIN_001"
}

Request Parameters

ParameterTypeRequiredDescription
emailstringYesCustomer email
amountstring/numberYesAmount to charge
currencystringYesMust be NGN for wallet-specific settlement
wallet_codestringYesTarget NGN wallet code
callbackstringNo, recommendedURL to redirect after payment
referencestringNoMerchant unique transaction reference

Sample cURL

curl -X POST "https://backendapi.sayswitchgroup.com/api/v1/transaction/initialize/wallet" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "customer@example.com",
    "amount": "5000",
    "currency": "NGN",
    "wallet_code": "NGN169XXXX",
    "callback": "https://merchantwebsite.com/callback",
    "reference": "MW_PAYIN_001"
  }'

Sample Response

{
  "success": true,
  "message": "Authorization URL created",
  "data": {
    "authorization_url": "https://checkout.sayswitchgroup.com/pay/SSW_17485283875909552",
    "access_code": "bvgpovv29dc5",
    "reference": "SSW_17485283875909552",
    "payer_id": null
  }
}

Notes

  • Use /api/v1/transaction/initialize for default wallet payments.
  • Do not send wallet_code to /api/v1/transaction/initialize.
  • wallet_code is only accepted on /api/v1/transaction/initialize/wallet.