Docs / API reference
Shortcodes
Your paybills and tills. View them, configure them and assign them to wallets.
The Shortcode object
A paybill or till number. Each one settles to the wallet you assign. A paybill can validate account numbers before the customer is charged.
Attributes
idstringUnique identifier, starting sc_.
typestringPaybill or till.
One of
paybill,tillnumberstringThe number customers pay.
namestringA name you choose.
statusstringWhether it takes payments.
One of
active,pending,suspendedwallet_idstring | nullThe wallet payments to this shortcode land in.
callback_urlstringWhere Pitisha sends each payment as a signed webhook.
validationbooleanPaybills only. Reject payments whose account number does not fit account_format.
account_formatstringThe account number rule.
Example object
{
"id": "sc_4012345",
"object": "shortcode",
"type": "paybill",
"number": "4012345",
"name": "Main paybill",
"status": "active",
"wallet_id": "wal_main",
"callback_url": "https://api.example.com/pitisha/callback",
"validation": true,
"account_format": "Invoice number, 6 digits",
"livemode": false,
"created_at": "2026-06-12T09:30:00+03:00"
}/v1/shortcodesList shortcodes
All shortcodes in this mode.
Query parameters
wallet_idstringOnly shortcodes on this wallet.
limitintegerHow many items to return, from 1 to 100. Defaults to 20.
starting_afterstringA cursor from a previous response's next_cursor. Returns the next page.
Errors
- 401 authentication_failed
See Errors for what each means.
curl -X GET "$PITISHA_API/v1/shortcodes" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY"{
"object": "list",
"data": [
{
"id": "sc_4012345",
"object": "shortcode",
"type": "paybill",
"number": "4012345",
"name": "Main paybill",
"status": "active",
"wallet_id": "wal_main",
"callback_url": "https://api.example.com/pitisha/callback",
"validation": true,
"account_format": "Invoice number, 6 digits",
"livemode": false,
"created_at": "2026-06-12T09:30:00+03:00"
}
],
"has_more": true,
"next_cursor": "cur_9fK2mQ"
}/v1/shortcodes/{id}Retrieve a shortcode
Fetch one shortcode.
Path parameters
idstringrequiredThe shortcode id.
Errors
- 404 not_found
See Errors for what each means.
curl -X GET "$PITISHA_API/v1/shortcodes/ID_FROM_RESPONSE" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY"{
"id": "sc_4012345",
"object": "shortcode",
"type": "paybill",
"number": "4012345",
"name": "Main paybill",
"status": "active",
"wallet_id": "wal_main",
"callback_url": "https://api.example.com/pitisha/callback",
"validation": true,
"account_format": "Invoice number, 6 digits",
"livemode": false,
"created_at": "2026-06-12T09:30:00+03:00"
}/v1/shortcodes/{id}Configure a shortcode
Assign it to a wallet and set how it validates.
Setting wallet_id is how you assign a shortcode to a wallet. From then on, every payment to it lands there.
Path parameters
idstringrequiredThe shortcode id.
Body parameters
wallet_idstring | nullThe wallet to settle to, or null to unassign.
namestringA new name.
callback_urlstringA new callback URL.
validationbooleanPaybills only.
account_formatstringThe account number rule.
Errors
- 404 not_found
- 400 invalid_request
- 403 permission_denied
See Errors for what each means.
curl -X PATCH "$PITISHA_API/v1/shortcodes/ID_FROM_RESPONSE" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"wallet_id": "wal_shop",
"validation": true
}'{
"id": "sc_4012345",
"object": "shortcode",
"type": "paybill",
"number": "4012345",
"name": "Main paybill",
"status": "active",
"wallet_id": "wal_shop",
"callback_url": "https://api.example.com/pitisha/callback",
"validation": true,
"account_format": "Invoice number, 6 digits",
"livemode": false,
"created_at": "2026-06-12T09:30:00+03:00"
}