Payment Methods
Payment methods let you securely tokenize customer instruments—mobile money wallets, bank accounts, and cards—for future use. Once saved, you can charge them without re-collecting sensitive details, enabling one-click checkouts, subscription billing, and retry logic for failed payments.
The payment method object
A payment method represents a tokenized instrument tied to a customer. It includes the payment rail (type), network provider (issuer), and a masked or tokenized account identifier. After tokenization, you can verify the method to confirm ownership and unlock frictionless charging.
Properties
Tokenize payment method
Save a new payment method for a customer without charging it. The method is tokenized and stored for future use. Currently supports mobile money wallets—cards and bank accounts coming soon.
Use cases
- Onboarding flow: Collect payment details during signup for later billing.
- Add payment method: Let customers save multiple instruments for checkout flexibility.
- Subscription setup: Tokenize before the first billing cycle starts.
Required attributes
Optional attributes
Request
curl https://api.zebo.dev/payment_methods/tokenize \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cu_a1b2c3d4e5",
"payment_method_data": {
"type": "mobile_money",
"mobile_money": {
"issuer": "mtn",
"number": "+233242057831"
}
},
"verify_immediately": false
}'
Response
{
"payment_method": {
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"issuer": "mtn",
"number": "024205****",
"created_at": "2025-11-23T13:00:00Z",
"verified": false,
"enabled": true
}
}
Verify payment method
Send an OTP to confirm customer ownership of a payment method. For mobile money, we send a 6-digit code via SMS to the registered wallet number. The customer submits the token to complete verification—once verified, the method can be charged without additional confirmation.
Why verify?
- Fraud prevention: Ensures the customer controls the payment instrument.
- Compliance: Meets network provider requirements for stored credentials.
- Better authorization rates: Verified methods skip OTP during charges, reducing friction and abandonment.
Required attributes
Request
curl https://api.zebo.dev/payment_methods/verify \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789"
}'
Response
{
"verification": {
"payment_method_id": "pm_xyz789",
"status": "pending",
"token_sent_at": "2025-11-23T13:05:00Z",
"expires_at": "2025-11-23T13:13:00Z",
"delivery": {
"recipient": "0242057831",
"channel": "sms",
"sender_id": "zverify"
}
}
}
Confirm verification
Submit the OTP the customer received to complete payment method verification. On success, the method's verified flag is set to true and it can be charged without additional confirmation steps.
Rules
- Tokens expire after 8 minutes (480 seconds).
- Failed attempts are logged—after 5 failures, the verification request is locked and you'll need to call
/verifyagain. - One successful verification per payment method—once verified, the status persists.
Required attributes
Request
curl https://api.zebo.dev/payment_methods/confirm_verification \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789",
"token": "847261"
}'
Response
{
"payment_method": {
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"issuer": "mtn",
"number": "024205****",
"created_at": "2025-11-23T13:00:00Z",
"verified": true,
"verified_at": "2025-11-23T13:07:00Z",
"enabled": true
}
}
Lookup payment method
Retrieve details for a specific payment method by ID. Returns the full payment method object including verification status, creation timestamp, and masked account details.
Required attributes
Request
curl https://api.zebo.dev/payment_methods/lookup \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789"
}'
Response
{
"payment_method": {
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"issuer": "mtn",
"number": "024205****",
"created_at": "2025-11-23T13:00:00Z",
"verified": true,
"verified_at": "2025-11-23T13:07:00Z",
"enabled": true
}
}
Delete payment method
Permanently remove a payment method from a customer's account. This action is irreversible—the tokenized credentials are deleted and the payment method can no longer be charged. Use this when customers explicitly request removal or when cleaning up unused methods.
Important notes
- Deleting a payment method does not affect past transactions or balance transactions that used it.
- Any subscriptions or recurring billing using this method will fail on the next charge attempt—update them with a new payment method first.
- For temporary disabling (e.g., suspected fraud), consider using an update endpoint to set
enabled: falseinstead of deleting (coming soon).
Required attributes
Request
curl https://api.zebo.dev/payment_methods/delete \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789"
}'
Response
{
"deleted": true,
"payment_method_id": "pm_xyz789"
}
Payment method settings
Retrieve payment method acceptance settings for your application. This endpoint returns configuration for all supported payment types—mobile money, bank accounts, cards, and Motito—including whether each type is enabled and requires customer confirmation before use.
Use cases
- Checkout UI: Show only enabled payment methods in your checkout flow.
- Conditional flows: Require explicit consent when
confirms_useis true for a payment type. - Settings dashboard: Display current acceptance preferences to merchants.
Response structure
The settings object contains an entry for each payment method type with:
enabled: Whether this type can be used for paymentsconfirms_use: Whether customers must explicitly agree before using this typenameanddescription: Human-readable labels for UI display
Request
curl https://api.zebo.dev/payment_methods/settings \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json"
Response
{
"settings": {
"mobile_money": {
"type": "mobile_money",
"name": "Mobile Money",
"description": "Pay with MTN, Vodafone, or AirtelTigo mobile wallets",
"enabled": true,
"confirms_use": true
},
"bank_account": {
"type": "bank_account",
"name": "Bank Account",
"description": "Direct bank transfer or debit",
"enabled": true,
"confirms_use": false
},
"card": {
"type": "card",
"name": "Card",
"description": "Credit or debit card payments",
"enabled": true,
"confirms_use": true
},
"motito": {
"type": "motito",
"name": "Motito",
"description": "Pay with your Motito balance",
"enabled": false,
"confirms_use": true
}
}
}
For more details about payment method settings and how to use them in your integration, see the Understanding Payment Method Settings guide.