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/walletHeaders
Authorization: Bearer YOUR_SECRET_KEY
Content-Type: application/jsonRequest Body
{
"email": "customer@example.com",
"amount": "5000",
"currency": "NGN",
"wallet_code": "NGN169XXXX",
"callback": "https://merchantwebsite.com/callback",
"reference": "MW_PAYIN_001"
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Customer email |
amount | string/number | Yes | Amount to charge |
currency | string | Yes | Must be NGN for wallet-specific settlement |
wallet_code | string | Yes | Target NGN wallet code |
callback | string | No, recommended | URL to redirect after payment |
reference | string | No | Merchant 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/initializefor default wallet payments. - Do not send
wallet_codeto/api/v1/transaction/initialize. wallet_codeis only accepted on/api/v1/transaction/initialize/wallet.