SMSOnline API Doc
  1. Manage phone numbers
SMSOnline API Doc
  • Preparation
  • FAQ
  • V3
    • Customer API
      • Payments
        • Cryptocurrency via Cryptomus
          • Create new payment
          • Get direct wallet
          • Get transaction status
        • Credit Card via Pay4bit
          • Create new payment
      • Favourites
        • Get favourite services
        • Toggle favourite status
      • Get Account Balance
      • Get invoices
      • Get Coupons
    • Phones API
      • Lookup API
        • Get service list by country and carrier
        • Get service detail by country and carrier
      • Inventory API
        • Get inventory
      • Order API
        • Order a number
        • Get order data
        • Change order status
      • Get Popular list
      • Get all available countries/carriers
    • Statistics API
      • Get statistics
  • V2(Deprecated)
    • Warning: V2 API is deprecated
    • Account
      • Get Balance
      • Make a top-up with crypto
      • (Get direct wallet address) Make a top-up with crypto
    • Lookup
      • Get Available Countries
      • Get Available Services
      • Get Service Details
      • Get the country stats with success rates
    • Manage phone numbers
      • Purchase Number
        POST
      • Return Number
        POST
      • Request Another SMS
        POST
      • Get Status of A Single Number
        GET
      • Get Bulk Status of Numbers With Conditions
        GET
  1. Manage phone numbers

Return Number

POST
https://api.smsonline.cloud/cs/refund
This API cancels a phone number purchase associated with a specified orderId.
If the number has not received any SMS and is eligible for refund, the purchase will be canceled with a 200 response and 100% of the funds will be returned to your account balance.

Request

Body Params application/json
userId
string 
required
User Id linked to API key
key
string 
required
API key
orderId
string 
required
Order ID
Example
{
    "userId": "string",
    "key": "string",
    "orderId": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.smsonline.cloud/cs/refund' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "string",
    "key": "string",
    "orderId": "string"
}'

Responses

🟢200Success
application/json
If the request is completed successfully, a 200 response code is returned.
Body
error
boolean 
required
body
string 
required
Refund status
Example
{
    "error": false,
    "body": "Refund Completed"
}
🟠401Unauthorized
🟠403Forbidden
🔴500Server Error
Modified at 2025-04-19 08:03:33
Previous
Purchase Number
Next
Request Another SMS
Built with