Download OpenAPI specification:
The Temp-Number Backend API (aka Temp-Number API) is an API layer provided by the Temp-Number Backend. This backend is an open-source solution for mobile and web applications, enabling seamless integration for selling temporary virtual phone numbers used in SMS activations and OTP verification. Built on Node.js, it efficiently manages customer accounts, balances, and activation workflows.
This API uses Firebase Authentication to authenticate app users but can be replaced with any other authentication system. Authenticated users are synced with Platfone customers while removing all personally identifiable information. The backend handles payments and balance adjustments, syncing with Temp-Number’s backend system. Through this integration, your app gains access to Temp-Number’s pool of temporary phone numbers, ensuring high SMS verification success rates.
getServices and getCountries. getPriceByService, getPriceByCountry, and getPricesForServiceInCountry. createActivation. getActivation or getActiveActivations. getBalance.app-createActivation – Initiate a new activation. app-getActiveActivations – List active activations. app-getActivation – Get activation details. app-retryActivation – Request an SMS resend. app-cancelActivation – Cancel an activation. app-getActivationHistory – Retrieve activation history. app-getBalance – Check customer balance. app-getTransactions – View transaction history. app-getActivationReportReasons – List reasons for reporting activations. app-reportActivation – Report an activation. app-getReport, app-getReports – View reports with pagination.app-getCountries – Retrieve available activation countries. app-getServices – Get services eligible for activations. app-getPricesByService, app-getPricesByCountry, app-getPricesForServiceInCountry – Retrieve pricing data.stripe-getPaymentIntent – Create a Stripe payment intent. appstore-createTransaction – Handle App Store transactions. googleplay-createTransaction – Handle Google Play transactions. googleplay-handleWebhookEvents – Process Google Play webhook events. appstore-handleWebhookEvents – Process App Store webhook events.manage-createCustomer – Create a customer profile. manage-changeCustomer – Update customer status. manage-createCustomerTransaction – Adjust customer balance. manage-getCustomers – List all customers and balances. manage-getCustomersActivationHistory – View activation history. manage-getCustomersTransactions – View transaction history.id and phone. phone. getActivation every 10 seconds until smsReceived or expire_at.This section includes endpoints used by your application to operate on a single customer.
Examples include creating and managing activation for a customer, retrieving his balance, transactions, etc.
Endpoints have the prefix app-.
Returns a mobile phone number for service activation and activation ID. Bills customers amount specified by you.
Send an SMS to the provided phone number and use the activation ID to check the SMS with app-getActivation.
service_id and country_id to order a number. Retrieve these IDs via app-getServices and app-getCountries.other service.is_retriable field in response suggests, if the activation can receive multiple SMS messages.Billing for SMS Activation
You set CUSTOMER_MARKUP during NodeJS-App Backend installation.
CUSTOMER_MARKUP applies to base prices (check them in https://platfone.com).
In getPricesByCountry, getPricesByCountry and getPricesForServiceInCountry you get prices with CUSTOMER_MARKUP already applied and ready to be shown to the customer.
The market for temporary numbers is highly dynamic — prices may change every minute.
To prevent overcharging the customer, you MUST set the customer_max_price parameter when creating an activation. This value represents the maximum amount (in USD cents) your customer is willing to pay.
Practically, you should set customer_max_price to the price you display in your app or UI, ensuring consistency and trust in your pricing.
If no phone number is available at or below your specified customer_max_price, the request will fail with a:
409 MaxPriceExceededException
This means:
The response includes:
suggestedPrice: the updated lowest price availableorder_id: a unique continuation token to retry the activation attemptTo continue smoothly:
suggestedPrice to your customer, if neededorder_idcustomer_max_price (e.g., equal to suggestedPrice or higher)This allows the system to continue the original activation attempt, avoiding full reprocessing and improving the success rate.
customer_max_price to the price you actually show the customerMaxPriceExceededException, use the order_id together with the new customer_max_price to retry seamlessly without starting from scratchWe constantly monitor the quality of our phone number suppliers. Since higher quality numbers have a better chance of successfully receiving SMS messages, we recommend taking quality into account when ordering numbers.
Quality Factor: The quality_factor parameter allows you to balance quality against price. This parameter is an integer ranging from 0 to 100, with a default value of 50.
| service_id required | string [ 1 .. 30 ] characters ID of Service being verified. Can be retrieved using |
| country_id required | string [ 2 .. 9 ] characters ID of phone number Country. Can be retrieved using |
| customer_max_price required | integer [ 1 .. 10000 ] Maximum price in USD cents your customer is willing to pay for activation.
This safeguards against price changes. Practically, you should set |
| order_id | string Optional continuation token for an activation attempt that failed due to pricing limits. When you receive a In that case, the response includes a This ensures the system can continue the previous attempt with the same selection context, potentially increasing the success rate and reducing redundant attempts. Recommended Usage:
|
| quality_factor | number [ 0 .. 100 ] Quality factor for the number. The quality factor is a number between 0 and 100. The default value is 50. 0 - means prefer price over quality. 100 - means prefer quality over price. |
{- "service_id": "7eleven",
- "country_id": "us",
- "customer_max_price": 90,
- "order_id": "682b17b958bf608ceae5ec3c",
- "quality_factor": 10
}{- "activation_id": "64a1c0e8d2a1f9b7e45d3b8e",
- "customer_id": "yHZpQ8lf89aLt8uR6hNyJH7gk0y5",
- "customer_price": 80,
- "price": 20,
- "phone": "14155552671",
- "country_id": "us",
- "service_id": "netflix",
- "sms_status": "smsRequested",
- "activation_status": "active",
- "billing_status": "reserved",
- "report_status": null,
- "sms_code": null,
- "sms_text": null,
- "expire_at": 1729088539,
- "updated_at": 1729087939,
- "created_at": 1729087339,
- "is_retriable": false,
- "cancelable_after": null,
- "formatted": "+1 415 555-2671"
}Fetches active activations IDs. Optionally include activation data.
| with_data | boolean Default: false Example: with_data=true Include activation data |
[- "64a1c0e8d2a1f9b7e45d3b8e",
- "63f4d0dab040a865d80da08d",
- "63f4d0dab040a865d80da08a"
]Retrieve the activation state, including activation status, sms status, billing status, expiration, SMS code and text message, etc.
Typically, this endpoint is polled either until the SMS is received or the activation expires.
There are several statuses that an activation can have, each representing a different state of the activation process. The following are the possible statuses:
"smsRequested": The initial state when an SMS is requested but not yet received."smsReceived": The SMS has been received."retryRequested": The user has requested another SMS."retryReceived": The user has received a another SMS."active": The activation is currently active and can proceed."finalized": The user has confirmed the activation, and no further changes are possible."expired": The activation has expired based on the expire_at timestamp."canceled": The activation was canceled before any SMS was received."reserved": Funds are reserved from the user's available balance upon activation creation."released": No SMS was received, and reserved funds were returned to the available balance."billed": An SMS was received, and the reserved funds have been charged."refunded": A refund was issued after a user report, and the amount was returned to the available balance.null: No report has been made."inReview": The report is under review."declined": The report was reviewed, and no refund was granted."approved": The report was reviewed, and a refund was issued.Each activation has a limited lifetime. The expiration time of an activation can be determined by the expire_at attribute. If the activation is not completed within this timeframe, it will expire, and no further SMS retrievals will be possible.
expire_at field to ensure the activation is still valid. If the current time is past expire_at, consider the activation expired, even if the activation_status field has not yet been updated to "expired".activation_status field includes "finalized" to indicate that the activation has been confirmed by the user, and no further changes are allowed. Finalized activations should be removed from the active activations list.report_status field to track the outcome of any user reports regarding issues with the activation. This field is closely related to the billing_status if a refund is issued.cancelable_after field indicates when an activation can be canceled. If this field is null, the activation does not support cancellation. If the current time is past the cancelable_after timestamp, the activation can be canceled using cancel operation.is_retriable field indicates whether the user can request another SMS. If true, the user can request a retry SMS using the retry operation. Retry possible after first sms recieved and while activation_status is active.price field indicates the cost of the activation in USD cents. The amount is reserved from the user's available balance when the activation is created. The billing_status field indicates the current billing state of the activation.| activation_id required | string Example: activation_id=63f4d0dab040a865d80da08a Activation id |
{- "activation_id": "64a1c0e8d2a1f9b7e45d3b8e",
- "customer_id": "yHZpQ8lf89aLt8uR6hNyJH7gk0y5",
- "customer_price": 80,
- "price": 20,
- "phone": "14155552671",
- "country_id": "us",
- "service_id": "netflix",
- "sms_status": "smsRequested",
- "activation_status": "active",
- "billing_status": "reserved",
- "report_status": null,
- "sms_code": null,
- "sms_text": null,
- "expire_at": 1729088539,
- "updated_at": 1729087939,
- "created_at": 1729087339,
- "is_retriable": false,
- "cancelable_after": null,
- "formatted": "+1 415 555-2671"
}Instructs the server to overwrite the previous SMS with the first one arriving. Both "code" and "text" fields will be updated. This operation is free of charge, as billing occurs upon receipt of the first SMS.
This operation is only possible if:
sms_status of the activation is either smsReceived or retryReceived.activation_status = active.is_retriable = true.| activation_id required | string Activation ID |
{- "activation_id": "63f4d0dab040a865d80da08a"
}{- "result": "success"
}Typically, you can cancel an active activation as long as no SMS has been received.
The cancelable_after field indicates when an activation can be canceled:
null, the activation does not support cancellation.cancelable_after timestamp, the activation can be canceled using cancel operation.Cancellation is only possible if:
activation_status = active.sms_status = smsRequested.cancelable_after allows cancelation.| activation_id required | string Activation ID |
{- "activation_id": "63f4d0dab040a865d80da08a"
}{- "result": "success"
}Finalize an activation to prevent further SMS messages from being sent to the phone number and to reduce the number of active numbers.
Finalize is only possible if:
sms_status of the activation is either of smsReceived, retryRequested or retryReceived.activation_status = activebilling_status = billed| activation_id required | string Activation ID |
{- "activation_id": "63f4d0dab040a865d80da08a"
}{- "result": "success"
}Fetches a history of activations, offering a comprehensive overview of past activation records. Each record includes details such as the activation ID, phone number, country ID, service ID, statuses, SMS code, SMS text, and timestamps for expiration and last update. The response is organized in a paginated format, allowing for efficient navigation through the activation records.
| exclude_reported | boolean Default: false Example: exclude_reported=true If true, only activations where |
| exclude_active | boolean Default: false Example: exclude_active=true If true, only activations where |
| only_expired | boolean Default: false Example: only_expired=true If true, only activations where |
| page | integer Default: 1 Example: page=3 Selected page number |
| limit | integer [ 1 .. 100 ] Default: 10 Example: limit=10 Items limit per page |
{- "activations": [
- {
- "activation_id": "63f4d0dab040a865d80da08a",
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "customer_price": 100,
- "phone": "447975777666",
- "country_id": "uk",
- "service_id": "7eleven",
- "sms_status": "smsRequested",
- "activation_status": "expired",
- "billing_status": "billed",
- "report_status": null,
- "sms_code": "6363",
- "sms_text": "Your code is 6363",
- "price": 90,
- "expire_at": 1679061628,
- "updated_at": 1679061629,
- "created_at": 1679061001,
- "is_retriable": true,
- "cancelable_after": null,
- "formatted": "+44 7975 777666"
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Retrieves the current balance of customer, which is provided in USD cents. Note that there may be a slight delay in the balance update.
{- "total": 2301,
- "reserved": 210
}Get transactions list of customer. Filter by creation date.
| created_from_timestamp | integer Example: created_from_timestamp=1632400000 Unix timestamp in seconds. If provided, only transactions created after this timestamp will be returned. |
| created_to_timestamp | integer Example: created_to_timestamp=1632486400 Unix timestamp in seconds. If provided, only transactions created before this timestamp will be returned. |
| page | integer >= 1 Default: 1 Example: page=3 Selected page number. Default is 1. |
| limit | integer [ 1 .. 100 ] Default: 10 Example: limit=10 Maximum number of transactions to return. Default is 100. If not provided, 100 customers will be returned. |
{- "transactions": [
- {
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "transaction_id": "63f4d0dab040a865d80da08a",
- "gateway": "stripe",
- "amount": 190,
- "created_at": 1632400000
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Set notifications settings of customer.
| email_enabled | boolean If |
| push_enabled | boolean If |
| fb_token | string The Firebase notification token of the user. if present than renew last time access of token or add new. Max 5 tokens per user, if more than 5 tokens than remove the oldest token. |
{- "email_enabled": true,
- "push_enabled": true,
- "fb_token": "1234567890"
}{- "result": "success"
}Set contact us email
| email required | string The email address of the user who is sending the email. This email address will be used as the reply-to address. |
| subject required | string The subject of the email. |
| message required | string The body of the email. |
| recaptcha_token required | string The reCAPTCHA token generated by the reCAPTCHA Enterprise. This token is used to verify that the user is not a bot. reCaptch action: "contact_us" |
| platform required | string Enum: "web" "android" "ios" The platform from which the email is being sent. This can be either 'web' or 'android' or 'ios'. |
{- "subject": "I have a question",
- "message": "I have a question about the product.",
- "recaptcha_token": "03AGdBq27b8Jkdsjfklsjdkgljsdkfgjslkfjgklsdjfg;sdgf",
- "platform": "web"
}{- "result": "success"
}The section includes endpoints for obtaining prices for activation. Various services have different activation costs, which also depend on the country of the mobile number being ordered. All prices are listed in USD cents. In addition to the price, you also retrieve the number of available phone numbers for sale.
All prices already have CUSTOMER_MARKUP applied. Meaning this prices meant to be displayed to your customers.
The CUSTOMER_MARKUP is set by you during Platfone Firebase Backend installation.
Formula for price calculation is: customer_price = service_price * ( 1 + CUSTOMER_MARKUP/100)
, where service_price is the price from the API response.
We have multiple offerings on our side therefore we provide minimum, maximum, and suggested prices per service and country.
Min and Max price represents whole price range. If you don't have special price consideration, suggested can be a good choice. Use max_price to set your price limit.
You can check prices at Platfone price section or through API
Retrieve the price and availability for a specific service in a specific country.
Use service_id and country_id to specify the service and country, respectively.
These identifiers can be found via the app-getServices and app-getCountries operations.
| service_id required | string <^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-_]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-_]*[A-Za-z0-9])$> [ 1 .. 30 ] characters Example: service_id=7eleven Service ID, as returned by |
| country_id required | string [ 2 .. 9 ] characters ^[a-zA-Z0-9]+([-_]*[a-zA-Z0-9]+)*$ Example: country_id=uk Country ID, as returned by the |
{- "price": {
- "min": 210,
- "max": 510,
- "suggested": 310
}, - "quality": {
- "avg": 0.3
}, - "count": 143
}Retrieve a comprehensive price list, organized by country. This endpoint returns a list of countries, each accompanied by an array of services available within that country, their respective prices, and the amount of available numbers for sale.
Use optional country_id query parameter to get prices in a specific country.
| country_id | string [ 2 .. 9 ] characters ^[a-zA-Z0-9]+([-_]*[a-zA-Z0-9]+)*$ Example: country_id=uk Country ID, as returned by the |
[- {
- "country_id": "uk",
- "services": [
- {
- "service_id": "7eleven",
- "price": {
- "min": 210,
- "max": 510,
- "suggested": 310
}, - "quality": {
- "avg": 0.3
}, - "count": 143
}
]
}
]Retrieve a comprehensive price list, organized by service. This endpoint returns a list of services, each accompanied by an array of countries available for that service, their respective prices, and the amount of available numbers for sale.
Use optional service_id request parameter to get prices for a specific service.
| service_id | string <^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$> [ 1 .. 30 ] characters Example: service_id=7eleven Service ID, as returned by |
[- {
- "service_id": "7eleven",
- "countries": [
- {
- "country_id": "uk",
- "price": {
- "min": 210,
- "max": 510,
- "suggested": 310
}, - "quality": {
- "avg": 0.3
}, - "count": 143
}
]
}
]The catalog includes endpoints used to retrieve lists of countries and services available for activation. The list of services is regularly updated, with new services added to the catalog as they become available. These lists contain the IDs of the countries and services, which are utilized in the activation process. Before ordering a number, you should first verify the availability of the service and country through the price endpoints.
You get icons for services and countries in the catalog by calling:
https://temp-number.sfo3.cdn.digitaloceanspaces.com/retail/png/countries/<country_id>.pnghttps://temp-number.sfo3.cdn.digitaloceanspaces.com/retail/png/services/<service_id>.pngFor "any other" service use this icon.
Returns a list of countries, including each country's unique identifier and name.
Use the country_id to specify the country when creating an activation.
Countries that has suffix _v in their country_id are countries that contains only virtual mobile phone numbers. E.g. us_v is United States (Virtual) containing virtual mobile phone numbers in USA.
| If-None-Match | string Example: 2a7d00a6580048cdc81c1ac65bab7be9820e4465 Optional header for cache validation based on X-ETag. |
[- {
- "country_id": "uk",
- "name": "United Kingdom",
- "alt_name": "France|frankrijk|frança|франция|fr",
- "codes": [
- "1658",
- "1876"
]
}
]Returns a list of services, including each service unique identifier and name. Use the service_id to specify the service when creating an activation.
Service with ID other is special service that must be used when you want to get number for service activation that is not listed in the services list. Please note that using the other service for activating services that are listed may result in account suspension.
| If-None-Match | string Example: 2a7d00a6580048cdc81c1ac65bab7be9820e4465 Optional header for cache validation based on X-ETag. |
[- {
- "service_id": "7eleven",
- "name": "7-Eleven",
- "alt_name": "7-Eleven",
- "has_description": true,
- "has_warning": false
}
]Returns a list of popular services. It may be used to show the most popular services to the user to simplify the selection process.
Service with ID other is special service that must be used when you want to get number for service activation that is not listed in the services list. Please note that using the other service for activating services that are listed may result in account suspension.
Descriptions and warning texts can be fetched in different languages from: https://temp-number.sfo3.cdn.digitaloceanspaces.com/service_descriptions_and_warnings.json
| If-None-Match | string Example: 2a7d00a6580048cdc81c1ac65bab7be9820e4465 Optional header for cache validation based on X-ETag. |
[- {
- "service_id": "7eleven",
- "name": "7-Eleven",
- "alt_name": "7-Eleven",
- "has_description": true,
- "has_warning": false
}
]The section includes endpoints for reporting activations.
If you have any issues with the activation process, you can report them using the app-reportActivation endpoint.
The report includes a reason for the issue, that can be retrieved using getActivationReportReasons, message and evidence.
The report is then reviewed by our team, and you will receive feedback on the issue, which can be viewed using the app-getReport endpoint.
The report is used to improve the activation process and ensure the quality of the service.
Returns a list of available report reasons IDs with name and evidence requirements for activation. Reasons list depends on current activation state.
Workflow:
getActivationReportReasons endpoint.
Along with the list of valid report reason IDs, you will also get if evidence is required.Use IDs from response to create report for the same activation you got reasons for.
Full list of Report Reasons:
| ID | Reason name |
|---|---|
| 1 | SMS is not coming |
| 2 | Wrong SMS received |
| 3 | Service not accepting the number |
| 4 | Number has been used before |
| 5 | Blocked after activation |
| 6 | SMS received too late |
| 7 | Other reason |
| activation_id required | string Example: activation_id=63f4d0dab040a865d80da08a Activation ID |
[- {
- "reason_id": 1,
- "reason_name": "SMS is not coming",
- "evidence_required": true
}, - {
- "reason_id": 2,
- "reason_name": "Wrong SMS received",
- "evidence_required": false
}
]This endpoint allows you to create a report for a specific activation.
Important: Only one report can be created per activation. Submitting invalid or incomplete data may result in the report being declined.
Declined Report Response Details:
If the report is not accepted, you will receive a response with a decline_id. Below are the possible reasons corresponding to each decline_id:
| Decline ID | Reason |
|---|---|
| 1 | Try another number |
| 2 | Retry using the same number |
Workflow:
Retrieve Available Report Reasons: Before creating a report, you must first retrieve the available report reasons for the specific activation using the getActivationReportReasons endpoint.
This will return a list of valid report reason IDs based on the current state of the activation, along with any evidence requirements.
Submit a Report: Once you have obtained the list of valid report reasons, you can create a report by selecting an appropriate reason ID and including any required evidence.
If required, the evidence parameter must be provided in base64 format, following the guidelines outlined in the request body specification.
Ensure that the reason ID and any accompanying evidence match the list returned by the getActivationReportReasons endpoint.
| activation_id required | string Activation ID | |||||||||||||||||||||
| reason_id required | integer >= 1 ID of reason | |||||||||||||||||||||
| message | string <= 1000 characters Message with details about the report. | |||||||||||||||||||||
| evidence | string <base64> A base64 encoded file, formatted as a data URL, containing evidence for the report. Acceptable File Types: Acceptable File Types:
Maximum File Size: 5MB (5,242,880 bytes). Example:
The data URL must begin with the appropriate MIME type, followed by the base64 encoded content. Note: Ensure that the total size of the base64 encoded data does not exceed the maximum limit, as this can cause the server to reject the request. The server will validate the file type and size during processing. |
{- "activation_id": "63f4d0dab040a865d80da08a",
- "reason_id": 4,
- "message": "Service activation is not possible because 2FA was previously enabled.",
- "evidence": "data:image/png;base64,iVBORw0KGgoAABBAAAB5f..."
}{- "status": "accepted",
- "decline_id": null
}Return a report object by Activation Id
| activation_id required | string Example: activation_id=63f4d0dab040a865d80da08a Activation ID |
{- "reason_id": 1,
- "reason_name": "SMS is not coming",
- "message": "Test message",
- "activation_state_snapshot": "{\"activation_status\":\"active\",\"sms_status\":\"smsRequested\",\"billing_status\":\"reserved\",\"sms_code\":null,\"sms_text\":null,\"updated_at\":1725264364}",
- "updated_at": 1679061001,
- "created_at": 1679061001,
- "activation": {
- "activation_id": "63f4d0dab040a865d80da08a",
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "customer_price": 100,
- "phone": "447975777666",
- "country_id": "uk",
- "service_id": "7eleven",
- "sms_status": "smsRequested",
- "activation_status": "expired",
- "billing_status": "billed",
- "report_status": null,
- "sms_code": "6363",
- "sms_text": "Your code is 6363",
- "price": 90,
- "expire_at": 1679061628,
- "updated_at": 1679061629,
- "created_at": 1679061001,
- "is_retriable": true,
- "cancelable_after": null,
- "formatted": "+44 7975 777666"
}
}Returns a list of reports with pagination
| page | integer Default: 1 Example: page=3 Selected page number |
| limit | integer [ 1 .. 100 ] Default: 10 Example: limit=10 Items limit per page |
{- "reports": [
- {
- "reason_id": 1,
- "reason_name": "SMS is not coming",
- "message": "Test message",
- "activation_state_snapshot": "{\"activation_status\":\"active\",\"sms_status\":\"smsRequested\",\"billing_status\":\"reserved\",\"sms_code\":null,\"sms_text\":null,\"updated_at\":1725264364}",
- "updated_at": 1679061001,
- "created_at": 1679061001,
- "activation": {
- "activation_id": "63f4d0dab040a865d80da08a",
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "customer_price": 100,
- "phone": "447975777666",
- "country_id": "uk",
- "service_id": "7eleven",
- "sms_status": "smsRequested",
- "activation_status": "expired",
- "billing_status": "billed",
- "report_status": null,
- "sms_code": "6363",
- "sms_text": "Your code is 6363",
- "price": 90,
- "expire_at": 1679061628,
- "updated_at": 1679061629,
- "created_at": 1679061001,
- "is_retriable": true,
- "cancelable_after": null
}
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Create new stripe payment intent for customer.
| amount required | integer [ 50 .. 100000 ] The amount to add to the customer balance, specified in USD cents. |
| recaptcha_token required | string The reCAPTCHA token generated by the reCAPTCHA Enterprise. This token is used to verify that the user is not a bot. reCaptch action: "stripe_payment" |
| platform required | string Enum: "web" "android" "ios" The platform from which the order is being created. This can be either 'web' or 'android' or 'ios'. |
{- "amount": 350,
- "recaptcha_token": "03AGdBq27b8Jkdsjfklsjdkgljsdkfgjslkfjgklsdjfg;sdgf",
- "platform": "web"
}{- "id": "pi_3MgoJsIPMzVE2",
- "clientSecret": "pi_3MgoJsIPMzVE2_secret_Dy55",
- "publicKey": "pk_test_51Meel8IPMzVEnbiR"
}Get stripe payment intent status by payment intent ID.
| payment_intent_id required | string The ID of the Stripe payment intent to retrieve the status for. |
| recaptcha_token required | string The reCAPTCHA token generated by the reCAPTCHA Enterprise. This token is used to verify that the user is not a bot. reCaptch action: "stripe_payment" |
| platform required | string Enum: "web" "android" "ios" The platform from which the order is being created. This can be either 'web' or 'android' or 'ios'. |
{- "payment_intent_id": "pi_3R7OJCHmvjeRhHLx1NKyn0Aw",
- "recaptcha_token": "03AGdBq27b8Jkdsjfklsjdkgljsdkfgjslkfjgklsdjfg;sdgf",
- "platform": "web"
}{- "status": "review"
}Create new appstore transaction for customer. Transaction from appstore passed to this endpoint. If transaction is valid and not already registered it will be saved in Firestore database and synced with customer's balance.
| appTransaction required | string Appstore transaction payload as jwsTransaction with appTransaction inside. |
{- "appTransaction": "eyJhbGciOiJFUzI1NiIsIng1YyI6WyJNSUlFTURDQ0E3YWdBd0lCQWdJUWZUbGZkMGZOdkZXdnpDMVlJQU5zWGpBS0JnZ3Foa2pPUFFRREF6QjFNVVF3UWdZRFZRUURERHRCY0hCc1pTQlhiM0pzWkhkcFpHVWdSR1YyWld4dmNHVnlJRkpsYkdGMGFXOXVjeUJEWlhKMGFXWnBZMkYwYVc5dUlFRjFkR..."
}{- "result": "success"
}Create new Google Play transaction for customer. Purchase token from Google Play passed to this endpoint. If token is valid and not already registered it will be saved in Firestore database and synced with customer's balance.
| purchaseTokenString required | string Google Play purchase token |
{- "purchaseTokenString": "{\"orderId\":\"GPA.3362-8982-7227-07777\",\"packageName\":\"com.privatix.activate.reseller\",\"productId\":\"one_dollar_purchase\",\"purchaseTime\":1727961892690,\"purchaseState\":0,\"purchaseToken\":\"oppolnojeefhcpiolfiejlmo.AO-J1OzD0FSoQnGAVGkt1SVX6NcVq4suAH5JL0rxMyZuUJMBc4twulwy4Qo5zF-mPSOguPrIUe94ujZW-ruDYQsX57dc6iNO-rz-PK0IumH2MbZk9ziH8OI\",\"quantity\":1,\"acknowledged\":false}"
}{- "result": "success"
}Create new paypal order for customer.
| amount required | integer [ 50 .. 100000 ] The amount to add to the customer balance, specified in USD cents. |
| recaptcha_token required | string The reCAPTCHA token generated by the reCAPTCHA Enterprise. This token is used to verify that the user is not a bot. reCaptch action: "paypal_payment" |
| platform required | string Enum: "web" "android" "ios" The platform from which the order is being created. This can be either 'web' or 'android' or 'ios'. |
{- "amount": 350,
- "recaptcha_token": "03AGdBq27b8Jkdsjfklsjdkgljsdkfgjslkfjgklsdjfg;sdgf",
- "platform": "web"
}{- "id": "3WH44913RS936084G",
- "status": "CREATED",
- "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "approve",
- "method": "GET"
}, - {
- "rel": "update",
- "method": "PATCH"
}, - {
- "rel": "capture",
- "method": "POST"
}
], - "client_id": "Ae1ldskjfaklsjdasdkjghjkldfhgsjdfhg"
}Capture paypal order for customer.
| order_id required | string Paypal order Id |
{- "order_id": "3WH44913RS936084G"
}{- "result": "success"
}Create new cryptomus payment for customer.
| amount required | integer [ 50 .. 100000 ] The amount to add to the customer balance, specified in USD cents. |
| url_return required | string The URL to redirect after payment. |
| url_success required | string The URL to redirect after successful payment. |
{- "amount": 350,
}This section includes endpoints for managing customers and get general information about retail service usage.
E.g. create customer, disable customer, get customers list, get activation history of all customers, get all transactions, etc.
Endpoints have the prefix manage-.
Create new customer and set initial balance.
| customer_id required | string <^[a-zA-Z0-9]+$> [ 1 .. 80 ] characters ID of customer. Must be unique. |
| balance | integer [ 0 .. 100000 ] Initial customer balance in USD cents. If it is greater than zero, financial transaction will be added with |
{- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "balance": 90
}{- "result": "success"
}Change customer status.
Available statuses:
disabled - customer is disabled. All customers operations are restricted.active - customer is active. All customers operations are allowed.paused - customer is paused. New activations are restricted.markedForDeletion - customer is marked for deletion. All customers operations are restricted.| customer_id required | string <^[a-zA-Z0-9]+$> [ 1 .. 80 ] characters ID of customer. Must be unique. |
| status required | string Enum: "disabled" "active" "paused" "markedForDeletion" New customer status. Can be |
{- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "status": "paused"
}{- "result": "success"
}Get customers list with their statuses and balances. Filter by status, customer_id and creation date.
| customer_id | string <^[a-zA-Z0-9]+$> [ 1 .. 80 ] characters Example: customer_id=xDWxt7dd6efro3yWL4qfuEWjvAz1 ID of customer. Must be unique. |
| status | Array of strings Items Enum: "disabled" "active" "paused" "markedForDeletion" Example: status=disabled&status=active Array of customer statuses to filter. If empty, all customers will be returned. |
| created_from_timestamp | integer Example: created_from_timestamp=1632400000 Unix timestamp in seconds. If provided, only customers created after this timestamp will be returned. |
| created_to_timestamp | integer Example: created_to_timestamp=1632486400 Unix timestamp in seconds. If provided, only customers created before this timestamp will be returned. |
| page | integer >= 1 Default: 1 Example: page=3 Selected page number. Default is 1. |
| limit | integer [ 1 .. 1000 ] Default: 100 Example: limit=10 Maximum number of customers to return. Default is 100. If not provided, 100 customers will be returned. |
{- "customers": [
- {
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "balance": 90,
- "status": "active",
- "created_at": 1632400000,
- "updated_at": 1632400000
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Get customers activation history. Filter by customer_id, activation_status, sms_status and creation date.
| customer_id | string [ 1 .. 80 ] characters ^[a-zA-Z0-9]+$ Example: customer_id=xDWxt7dd6efro3yWL4qfuEWjvAz1 ID of customer to get single customer. |
| activation_status | Array of strings Items Enum: "active" "expired" "canceled" "finalized" Example: activation_status=canceled&activation_status=finalized Array of activation statuses to filter. Empty array will return all activations. |
| sms_status | Array of strings Items Enum: "smsRequested" "smsReceived" "retryRequested" "retryReceived" Example: sms_status=smsReceived&sms_status=retryRequested Array of SMS statuses to filter. Empty array will return all activations. |
| created_from_timestamp | integer Example: created_from_timestamp=1632400000 Unix timestamp in seconds. If provided, only activations created after this timestamp will be returned. |
| created_to_timestamp | integer Example: created_to_timestamp=1632486400 Unix timestamp in seconds. If provided, only activations created before this timestamp will be returned. |
| page | integer >= 1 Default: 1 Example: page=3 Selected page number. Default is 1. |
| limit | integer [ 1 .. 1000 ] Default: 100 Example: limit=10 Maximum number of customers to return per page. Default is 100. If not provided, 100 customers will be returned. |
{- "activations": [
- {
- "activation_id": "63f4d0dab040a865d80da08a",
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "customer_price": 100,
- "phone": "447975777666",
- "country_id": "uk",
- "service_id": "7eleven",
- "sms_status": "smsRequested",
- "activation_status": "expired",
- "billing_status": "billed",
- "report_status": null,
- "sms_code": "6363",
- "sms_text": "Your code is 6363",
- "price": 90,
- "expire_at": 1679061628,
- "updated_at": 1679061629,
- "created_at": 1679061001,
- "is_retriable": true,
- "cancelable_after": null,
- "formatted": "+44 7975 777666"
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Get customers transactions list. Filter by purchase_id, customer_id and creation date.
| customer_id | string [ 1 .. 80 ] characters ^[a-zA-Z0-9]+$ Example: customer_id=xDWxt7dd6efro3yWL4qfuEWjvAz1 ID of customer to get single customer. |
| transaction_id | string [ 1 .. 80 ] characters ^[a-zA-Z0-9_]+$ Example: transaction_id=63f4d0dab040a865d80da08a ID of transaction to get single transaction. |
| created_from_timestamp | integer Example: created_from_timestamp=1632400000 Unix timestamp in seconds. If provided, only transactions created after this timestamp will be returned. |
| created_to_timestamp | integer Example: created_to_timestamp=1632486400 Unix timestamp in seconds. If provided, only transactions created before this timestamp will be returned. |
| page | integer >= 1 Default: 1 Example: page=3 Selected page number. Default is 1. |
| limit | integer [ 1 .. 1000 ] Default: 100 Example: limit=10 Maximum number of transactions to return. Default is 100. If not provided, 100 customers will be returned. |
{- "transactions": [
- {
- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "transaction_id": "63f4d0dab040a865d80da08a",
- "gateway": "stripe",
- "amount": 190,
- "created_at": 1632400000
}
], - "page": 1,
- "limit": 10,
- "pages": 5,
- "total": 48
}Create new financial transaction for customer.
| customer_id required | string <^[a-zA-Z0-9]+$> [ 1 .. 80 ] characters ID of customer. Must be unique. |
| transaction_id required | string <^[a-zA-Z0-9]+$> [ 1 .. 80 ] characters ID of financial transaction. Must be unique. If it is not unique, the transaction will be rejected. |
| amount required | integer [ -100000 .. 100000 ] Amount in USD cents to add or deduct to/from customer balance. If amount is positive, it will be added to customer balance. If amount is negative, it will be deducted from customer balance. Note: Customer balance may be negative. |
| gateway | string [ 1 .. 50 ] characters Payment gateway used for transaction. |
{- "customer_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "transaction_id": "xDWxt7dd6efro3yWL4qfuEWjvAz1",
- "amount": -350,
- "gateway": "stripe"
}{- "result": "success"
}Create Firebase custom token for Telegram authentification.
| id required | string Telegram user ID |
| first_name required | string Telegram user first name |
| last_name required | string Telegram user last name |
| username required | string Telegram user username |
| photo_url required | string Telegram user photo URL |
| auth_date required | string Telegram user auth date |
| hash required | string Telegram user hash |
{- "id": "3506436567",
- "first_name": "Test",
- "last_name": "Test",
- "username": "test",
- "auth_date": "1612345678",
- "hash": "test_hash"
}{- "token": "eyJhbGciOiJS...L2xoMy"
}