Fetches a list of SimPay services with pagination.
token[]
(string): The API token.page
(int): The page number to retrieve.callback[]
(string): The callback function that will be invoked with the results.
callback(error, Array:data, Trie:pagination);
error
(int): Error code.0
if no error.data
(Array): Array of service data (ID, name, type, etc.).pagination
(Trie): Pagination details.
Fetches information about a specific SimPay service.
token[]
(string): The API token.service_id[]
(string): The ID of the service to retrieve.callback[]
(string): The callback function that will be invoked with the service data.
callback(error, service_id, id, type, status, name, prefix, suffix, adult, Array:numbers, created_at);
error
(int): Error code.0
if no error.service_id
(string): The service ID.- Other service details:
id
,type
,status
,name
,prefix
,suffix
,adult
(int, 1 if adult), andcreated_at
. numbers
(Array): Array of numbers associated with the service.
Verifies an SMS code for a specific service.
token[]
(string): The API token.service_id[]
(string): The ID of the service.code[]
(string): The SMS code to verify.callback[]
(string): The callback function that will be invoked with the verification result.
callback(error, service_id, code, used, test, from, number, value, used_at);
error
(int): Error code.0
if no error.service_id
(string): The service ID.code
(string): The verified SMS code.used
(bool): Whether the code was already used.test
(bool): If it was a test transaction.from
(string): The sender's phone number.number
(int): The SMS number.value
(float): The value of the SMS code.used_at
(string): The time the code was used (if applicable).
Fetches a list of transactions for a specific service.
token[]
(string): The API token.service_id[]
(string): The ID of the service.page
(int): The page number to retrieve.callback[]
(string): The callback function that will be invoked with the transaction data.
callback(error, service_id, Array:data, Trie:pagination);
error
(int): Error code.0
if no error.service_id
(string): The service ID.data
(Array): Array of transaction data.pagination
(Trie): Pagination details.
Fetches detailed information for a specific transaction.
token[]
(string): The API token.service_id[]
(string): The ID of the service.transaction_id[]
(string): The ID of the transaction.callback[]
(string): The callback function that will be invoked with the transaction data.
callback(error, service_id, id, from, code, used, send_number, value, send_at);
error
(int): Error code.0
if no error.service_id
(string): The service ID.id
(int): The transaction ID.from
(string): The sender's phone number.code
(string): The SMS code.used
(bool): Whether the code was already used.send_number
(int): The sending number.value
(float): The value of the transaction.send_at
(string): The time the transaction was sent.
Fetches a list of numbers associated with a specific service.
token[]
(string): The API token.service_id[]
(string): The ID of the service.page
(int): The page number to retrieve.callback[]
(string): The callback function that will be invoked with the numbers data.
callback(error, service_id, Array:data, Trie:pagination);
error
(int): Error code.0
if no error.service_id
(string): The service ID.data
(Array): Array of numbers associated with the service.pagination
(Trie): Pagination details.
Fetches information about a specific number for a service.
token[]
(string): The API token.service_id[]
(string): The ID of the service.number
(int): The number to retrieve.callback[]
(string): The callback function that will be invoked with the number's details.
callback(error, service_id, number, value, value_gross, adult);
error
(int): Error code.0
if no error.service_id
(string): The service ID.number
(int): The number.value
(float): The net value associated with the number.value_gross
(float): The gross value.adult
(bool): Whether the number is adult-only.
Logs an error message based on the error code.
simpay_log_error_message(error);
Fetches a human-readable error message for a given error code.
simpay_get_error_message(error, out[], len);
- SE_CODE_NOT_OK: HTTP response code not OK.
- SE_INVALID_JSON: Failed to parse JSON from response.
- SE_UNSUCCESSFUL: API response indicated failure.