Payment Methods
Payment methods let you save a customer payment instrument once and reuse it later. Commerce stores the instrument behind a payment method ID, returns masked rail details in responses, and keeps the saved method linked to the customer who owns it. Use this API when you want faster repeat checkout, cleaner retry flows, or account-on-file billing.
Tokenize and update support idempotency. For either operation, a successful response can be replayed with the same idempotency key and request body for 24 hours. Lookup, page, and settings do not opt in to idempotent replay.
The payment method object
A payment method is the saved record you reuse later. It keeps the customer link, the payment rail, masked rail-specific details, optional metadata, and verification state when that flow is in use for the method.
Properties
Tokenize payment method
Save a payment method to a customer without starting a charge. The request is a top-level discriminated union: set type to mobile_money, bank_account, motito, or card, then provide the matching type-specific object when one is required.
This operation supports idempotency. Send the same idempotency_key and request body to replay a successful response for up to 24 hours.
Required attributes
Conditional attributes
Optional attributes
Request
curl https://api.zebo.dev/payment_methods/tokenize \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"mobile_money": {
"account_number": "0242057831",
"network": "mtn"
},
"owner": {
"name": "Jane Mensah",
"address": { "country": "GH" }
}
}'
{
"payment_method": {
"id": "pm_xyz789",
"active": true,
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"mobile_money": {
"network": "mtn",
"account_number": "****7831",
"last4": "7831"
},
"owner": {
"name": "Jane Mensah",
"address": { "country": "GH" }
},
"created_at": "2025-11-23T13:00:00Z"
}
}
Verify payment method
Payment-method verification is currently unavailable. Requests to this operation return 501 Not Implemented, so no public request example is provided.
Lookup payment method
Fetch one saved payment method by ID. Use this when you want to show the method back to the customer, inspect its verification state, or confirm which saved instrument you are about to reuse.
Send only payment_method_id here. You do not need a customer_id, and this endpoint rejects it.
Required attributes
Request
curl https://api.zebo.dev/payment_methods/lookup \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789"
}'
{
"payment_method": {
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"mobile_money": {
"network": "mtn",
"account_number": "024205****"
},
"custom_data": {
"segment": "vip"
},
"owner": {
"name": "Jane Mensah",
"address": {
"country": "GH",
"line_1": "1 High Street",
"region": "Greater Accra"
}
},
"verification": {
"request_id": "ver_abc123",
"type": "otp",
"mechanism": "sms",
"initiated_at": "2025-11-23T13:05:00Z",
"completed_at": "2025-11-23T13:07:00Z"
},
"created_at": "2025-11-23T13:00:00Z",
"verified_at": "2025-11-23T13:07:00Z"
}
}
Update payment method
Update payment-method metadata without re-tokenizing the underlying instrument. Use this when you want to attach internal annotations, clean up owner details, or remove stale metadata keys.
Required attributes
Optional attributes
This operation supports idempotency. Send the same idempotency_key and request body to replay a successful response for up to 24 hours.
Request
curl https://api.zebo.dev/payment_methods/update \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "pm_xyz789",
"active": false,
"custom_data": {
"segment": "vip",
"legacy_note": null
},
"owner": {
"name": "Jane Mensah",
"address": {
"country": "GH",
"line1": "1 High Street",
"region": "Greater Accra"
}
}
}'
{
"payment_method": {
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"mobile_money": {
"network": "mtn",
"account_number": "024205****"
},
"custom_data": {
"segment": "vip"
},
"owner": {
"name": "Jane Mensah",
"address": {
"country": "GH",
"line_1": "1 High Street",
"region": "Greater Accra"
}
},
"created_at": "2025-11-23T13:00:00Z",
"verified_at": "2025-11-23T13:07:00Z"
}
}
Page through payment methods
List the payment methods saved under the authenticated application. Results are newest first, so page 1 shows the most recently saved methods.
Provide customer_id when you want only one customer's saved methods. Leave it out when you want the broader application-level list.
Optional attributes
Response shape
- The top-level
pageobject includesnumber,size, andpayment_methods. - Each entry is the same payment method object returned by lookup.
- When
customer_idis present, every item in the page belongs to that customer.
Request
curl https://api.zebo.dev/payment_methods/page \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cu_a1b2c3d4e5",
"page_number": 1,
"page_size": 50
}'
{
"page": {
"number": 1,
"size": 1,
"payment_methods": [
{
"id": "pm_xyz789",
"customer_id": "cu_a1b2c3d4e5",
"type": "mobile_money",
"mobile_money": {
"network": "mtn",
"account_number": "****7831",
"last4": "7831"
},
"created_at": "2025-11-23T13:00:00Z"
}
]
}
}
Delete payment method
Payment-method deletion is currently unavailable. Requests to this operation return 501 Not Implemented, so no public request example is provided. To prevent reuse, call Update payment method with active: false.
Payment method settings
Read which payment method types your application can present at checkout. Use the response to decide what to render and whether a rail needs explicit customer confirmation before use.
Response structure
The settings object returns one entry per payment method type. Each entry tells you:
- whether the type is enabled
- whether the type requires explicit customer confirmation via
confirms_use - the display
nameanddescriptionyou can use in your own UI
Request
curl https://api.zebo.dev/payment_methods/settings \
-H "Authorization: Bearer $COMMERCE_API_KEY" \
-H "Content-Type: application/json"
{
"settings": {
"mobile_money": {
"type": "mobile_money",
"name": "Mobile Money",
"description": "Pay with Airtel, MTN, Telecel, or Vodafone 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.