LightMobile API Documentation.
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by calling login method.
This endpoint checks whether a customer account exists with the provided email address.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/check-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'john@example.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Customer already exists with this email.",
"data": {
"exists": true
}
}
This endpoint allows you to fetch your access token..
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'cassie52@example.net',
'password' => 'password',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Login Successful",
"data": {
"token": "xyzAbc374672346",
"name": "Cassie",
"address": "Gujarat ",
}
}
This endpoint allows users to submit a contact form
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/contact/send-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'John Doe',
'email' => 'john@example.com',
'phone' => '9876543210',
'message' => 'I need help with my order.',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"status": true,
"message": "Contact form submitted successfully.",
"data": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone": "9876543210",
"message": "I need help with my order.",
"created_at": "2025-01-01T10:00:00.000000Z",
"updated_at": "2025-01-01T10:00:00.000000Z"
}
}
This Endpoint Allows you to fetch the brands
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/brands';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This Endpoint Allows you to fetch the brand detail using the id.
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/brand/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This endpoint retrieves the NMI tokenization key and gateway type for a specific brand.
Brand ID.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/nmi-data/5';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "NMI Token fetched successfully",
"data": {
"id": 5,
"gateway": "nmi",
"nmi_tokenization": "your-tokenization-key"
}
}
This Endpoint allows you to fetch plans brand wise
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/plans/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This Endpoint allows you to fetch the plans of the mdn
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/plans-by-mdn/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This Endpoint allows you to fetch the refill plans based on the brand id
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill/plans/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This Endpoint allows you to fetch the activation plan details
The ID of the plan.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/plan/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This Endpoint allows you to fetch the refill plan details
The ID of the plan.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill/plan/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
This endpoint is used to activate a new SIM for a customer.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 5,
'plan_id' => 12,
'imei' => '13744917136806',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'address' => 'architecto',
'city' => 'architecto',
'state' => 'architecto',
'zipcode' => 'hwaykc',
'sim_type' => 'physical',
'source' => 'm',
'month' => 1,
'autopay' => true,
'partnerTransactionId' => 'architecto',
'addon_plans' => [
'architecto',
],
'sim_no' => '8901120200000000000',
'taxResponsePublic_id' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Activation request submitted successfully",
"data": {
"transaction_id": "uuid",
"status": "processing"
}
}
This Endpoint is used to calculate activation-related values for a specific plan based on the selected duration (month).
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation-calculation';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'plan_id' => 4326.41688,
'month' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); This Endpoint allows you to perform refill/reacharge
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'mdn' => 'bngzmi',
'plan_id' => 16,
'amount' => 4326.41688,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); This endpoint allows customers to recharge/refill their plan using a card via Stripe payment.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill-with-card';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'mdn' => '9876543210',
'plan_id' => 10,
'amount' => 4326.41688,
'brand_id' => 5,
'payment_intent_id' => 'pi_123456',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'address' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'zip_code' => '10001',
'taxResponsePublic_id' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Refill completed successfully.",
"data": {
"transaction_id": "uuid",
"status": "success"
}
}
This endpoint creates a port-in request without processing payment.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/portin';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 5,
'plan_id' => 10,
'imei' => '822569775449171',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'address' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'zipcode' => 4326.41688,
'sim_type' => 'esim',
'mdn' => '9876543210',
'account_number' => 'architecto',
'account_password' => 'architecto',
'authorizer_first_name' => 'architecto',
'authorizer_last_name' => 'architecto',
'authorizer_address' => 'architecto',
'authorizer_city' => 'architecto',
'authorizer_state' => 'architecto',
'authorizer_zipcode' => 4326.41688,
'phone' => '1374491716806',
'taxResponsePublic_id' => 'architecto',
'sim_no' => '8901122334455',
'pin' => 'architecto',
'zip_code' => '10001',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Port-in request created successfully.",
"data": {
"transaction_id": "uuid",
"status": "pending"
}
}
This endpoint handles porting a number into the system using card payment (Stripe).
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/portin-with-card';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 5,
'plan_id' => 10,
'imei' => '822569775449171',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'address' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'zipcode' => 4326.41688,
'sim_type' => 'esim',
'mdn' => '9876543210',
'account_number' => 'architecto',
'account_password' => 'architecto',
'authorizer_first_name' => 'architecto',
'authorizer_last_name' => 'architecto',
'authorizer_address' => 'architecto',
'authorizer_city' => 'architecto',
'authorizer_state' => 'architecto',
'authorizer_zipcode' => 4326.41688,
'phone' => '1374491716806',
'taxResponsePublic_id' => 'c90237e9-ced5-3af6-88ea-84aeaa148878',
'sim_no' => '8901122334455',
'pin' => 'architecto',
'payment_intent_id' => 'pi_123456',
'zip_code' => '10001',
'coupon_code' => 'SAVE10',
'autopay' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Port-in request created successfully.",
"data": {
"transaction_id": "uuid",
"status": "pending"
}
}
This endpoint allows swapping an existing SIM with a new SIM
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/simswap';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 1,
'mdn' => '9876543210',
'sim_no' => '890112233445566',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Sim Swap request sent successfully.",
"data": {
"status": "success",
"reference_id": "abc123"
}
}
This endpoint allows changing the phone number (MDN) of an active customer.
Change customer phone number.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/number-change';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 1,
'mdn' => '9876543210',
'zip_code' => '10001',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Number Change request sent successfully.",
"data": {
"status": "success",
"reference_id": "abc123"
}
}
This endpoint allows you to suspend your mdn.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/helix/suspend';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'brand_id' => 1,
'mdns' => '4534213423',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Suspended Successfully",
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/helix/deactivate';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); $client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/helix/restore';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'mdn' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); This endpoint processes SIM activation with card payment.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/nmi/activate-with-card';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 5,
'plan_id' => 12,
'imei' => '13744917136806',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'address' => '123 Main St',
'city' => 'New York',
'state' => 'NY',
'zipcode' => 'hwaykc',
'sim_type' => 'physical',
'source' => 'm',
'month' => 16,
'autopay' => true,
'partnerTransactionId' => 'u',
'addon_plans' => [
'architecto',
],
'sim_no' => '890123456789',
'payment_token' => 'architecto',
'payment_intent_id' => 'architecto',
'phone' => '9876543210',
'zip_code' => '10001',
'coupon_code' => 'SAVE10',
'total_price' => 120.5,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Activation completed successfully.",
"data": {
"transaction_id": "uuid",
"status": "success"
}
}
This endpoint retrieves detailed information about a transaction using its public transaction ID..
The ID of the public.
Transaction public UUID.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/transaction/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "",
"data": {
"id": 1,
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"plan_id": 12,
"plan": {
"id": 12,
"plan_name": "Unlimited Plan",
"description": "Unlimited calls & data",
"price": 30
},
"brand_id": 1,
"brand": {
"id": 1,
"name": "BrandX"
},
"month": 12,
"price": 30,
"sim_type": "esim",
"sim_no": "890123456789",
"status": "success",
"mdn": "9876543210",
"total_price": 330,
"totalTaxRate": 5.5,
"coupon_code": "SAVE10",
"addon_plans_price": 10,
"activationcode": "LPA:1$code",
"activation_date": "2025-01-01"
}
}
This endpoint retrieves the eSIM QR code using a SIM number and brand ID.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/esim/qr';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 1,
'sim_no' => '8901234567890123456'."\n"
."\n"
.'---',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); (Binary PNG image response)
This endpoint retrieves the eSIM QR code for a given transaction
Transaction public UUID.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/esim/qr/550e8400-e29b-41d4-a716-446655440000';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'public_id' => '6ff8f7f6-1eb3-3525-be4a-3932c805afed',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); (Binary PNG Image Response)
This endpoint validates and applies a coupon code (and optional add-ons) to calculate the final payable amount for a selected plan.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/coupon-referral-code';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 1,
'plan_id' => 12,
'month' => 12,
'taxResponsePublic_id' => 'tx_12345',
'coupon_code' => 'SAVE10',
'addon_plans' => [
'architecto',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Code Found Successfully",
"data": {
"coupon": {
"success": true,
"coupon_id": 1,
"coupon_amount": 10,
"amount_type": "fixed",
"total_discount_price": 90
},
"referral": null,
"final_price": 95.5
}
}
This endpoint sends an OTA (Over-The-Air) configuration message to a device based on the provided mobile number (MDN).
Mobile number associated with the device.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/helix/send-ota/9876543210';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "OTA sent successfully."
}
This endpoint checks whether a device (based on IMEI number) is eligible for activation under a specific brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/device/check-imei';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'imei' => '123456789012345',
'brand_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "IMEI check completed.",
"data": {
"imei": "123456789012345",
"brand_id": 1,
"aggregator": "nexus",
"sim_support": {
"physical_sim": true,
"esim": false
}
}
}
This endpoint returns a list of active addon plans for a specific brand.
Addon plans are typically used as additional services or top-ups that customers can purchase along with their main plan.
optional The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/addon-plans/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); [
{
"id": 1,
"plan_type": "addon",
"sku": "ADDON001",
"plan_name": "1GB Data Addon",
"description": "Extra 1GB high-speed data",
"price": "10.00",
"m1_spiff": "1.00",
"m2_spiff": "1.50",
"m3_spiff": "2.00",
"m6_spiff": "3.00",
"m9_spiff": "4.00",
"m12_spiff": "5.00",
"processing_fees": "0.50",
"brand_id": 1
}
]
This endpoint authenticates a customer using email and password.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/login';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'john@example.com',
'password' => 'secret123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Login successful.",
"data": {
"customer": {
"id": 1,
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe"
},
"token": {
"access_token": "1|abcxyz...",
"token_type": "Bearer"
}
}
}
This endpoint registers a new customer account using basic details.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/register';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'password' => 'secret123',
'gender' => 'male',
'phone' => '9876543210',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Customer registered successfully.",
"data": {
"customer": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"gender": "male",
"phone": "9876543210",
"created_at": "2025-01-01T10:00:00.000000Z",
"updated_at": "2025-01-01T10:00:00.000000Z"
}
}
}
This endpoint generates and sends a One-Time Password (OTP) to a customer via email or mobile number (MDN).
OTP is valid for 5 minutes.
Send OTP to customer via email or mobile number.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/send-otp';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'john@example.com',
'mdn' => '9876543210',
'brand_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "OTP sent successfully.",
"data": {
"customer": {
"email": "john@example.com",
"mdn": "9876543210"
}
}
}
This endpoint verifies a One-Time Password (OTP) sent to a customer via email or mobile number (MDN). Upon successful verification, it authenticates the customer and returns an access token.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/verify-otp';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'john@example.com',
'mdn' => '9876543210',
'otp' => '123456',
'brand_id' => 16,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "OTP verified successfully.",
"data": {
"customer": {
"id": 1,
"email": "john@example.com",
"mdn": "9876543210",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1995-05-10",
"address": "New York"
},
"token": {
"access_token": "1|abcxyz...",
"token_type": "Bearer"
}
}
}
This endpoint retrieves all saved payment cards for the authenticated customer based on the provided brand.
Authentication: This API requires authentication using a Customer Bearer Token.
The brand ID to filter cards.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/cards';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'query' => [
'brand_id' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Cards retrieved successfully.",
"data": [
{
"id": 1,
"customer_id": 10,
"brand_id": 1,
"last_four": "4242",
"expiry_month": "12",
"expiry_year": "2028",
"is_default": 1,
"created_at": "2026-04-18 12:00:00",
"updated_at": "2026-04-18 12:30:00"
},
{
"id": 2,
"customer_id": 10,
"brand_id": 1,
"last_four": "1111",
"expiry_month": "11",
"expiry_year": "2027",
"is_default": 0,
"created_at": "2026-03-01 10:00:00",
"updated_at": "2026-03-01 10:00:00"
}
]
}
This endpoint allows an authenticated customer to add a new payment card using Stripe.
Authentication: This API requires authentication using a Customer Bearer Token.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/cards';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'card_name' => 'b',
'card_type' => 'n',
'name' => 'John Doe',
'email' => 'john@example.com',
'phone_number' => '1234567890',
'country_code' => 'pwlvqw',
'address' => 'r',
'city' => 's',
'state' => 'i',
'zip_code' => 'tcpscqldzsnrwtuj',
'card_number' => 'architecto',
'payment_method_id' => 'pm_123456789',
'brand_id' => 1,
'is_default' => '0',
'stripe_customer_id' => 'cus_ABC123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Card added successfully.",
"data": {
"card": {
"id": 1,
"customer_id": 10,
"brand_id": 1,
"last_four": "4242",
"expiry_month": "12",
"expiry_year": "2028",
"created_at": "2026-04-18 12:00:00"
},
"stripe_customer_id": "cus_ABC123"
}
}
This endpoint retrieves details of a specific saved card for the authenticated customer.
Authentication: This API requires authentication using a Customer Bearer Token.
The ID of the card.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/cards/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Card retrieved successfully.",
"data": {
"id": 1,
"customer_id": 10,
"brand_id": 1,
"last_four": "1111",
"expiry_month": "12",
"expiry_year": "2028",
"is_default": 1,
"created_at": "2026-04-18 12:00:00",
"updated_at": "2026-04-18 12:30:00"
}
}
This endpoint allows an authenticated customer to update a saved card,
Authentication: This API requires authentication using a Customer Bearer Token.
The ID of the card to update.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/cards/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'brand_id' => 1,
'is_default' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Card updated successfully.",
"data": {
"id": 1,
"customer_id": 10,
"brand_id": 1,
"last_four": "1111",
"expiry_month": "12",
"expiry_year": "2028",
"is_default": 1,
"created_at": "2026-04-18 12:00:00",
"updated_at": "2026-04-18 12:30:00"
}
}
This endpoint allows an authenticated customer to delete one of their saved payment cards.
Authentication: This API requires authentication using a Customer Bearer Token.
The ID of the card to delete.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/cards/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Card deleted successfully."
}
This endpoint retrieves the profile details of the authenticated customer.
🔐 Authentication: This API requires authentication using a Customer Bearer Token.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/profile';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Profile fetch successfully.",
"data": {
"id": 10,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "1234567890",
"dob": "1995-05-20",
"created_at": "2026-01-01 10:00:00",
"updated_at": "2026-04-18 12:00:00"
}
}
This endpoint allows an authenticated customer to update their profile details. Only the provided fields will be updated (partial update supported).
🔐 Authentication: This API requires authentication using a Customer Bearer Token.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/profile';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'first_name' => 'John',
'last_name' => 'Doe',
'address' => 'g',
'city' => 'z',
'state' => 'm',
'zip_code' => 'iyvdljnikhwaykcm',
'date_of_birth' => '1995-05-20',
'gender' => 'male',
'password' => 'secret123',
'email' => 'john@example.com',
'phone' => '1234567890',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Profile updated successfully.",
"data": {
"id": 10,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "1234567890",
"dob": "1995-05-20",
"created_at": "2026-01-01 10:00:00",
"updated_at": "2026-04-18 12:00:00"
}
}
This endpoint retrieves a paginated list of orders (transactions) for the authenticated customer.
Authentication: This API requires authentication using a Customer Bearer Token.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/orders';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Orders fetched successfully.",
"data": [
{
"transaction_id": "PUB123456",
"mdn": "1234567890",
"sim_no": "SIM123456",
"sim_type": "physical",
"status": "success",
"price": "50.00",
"total_price": "55.00",
"type": "activation",
"plan_id": 5,
"plan_details": {},
"customer_id": 10,
"brand_id": 1,
"created_at": "2026-04-01 10:00:00",
"plan": {
"id": 5,
"plan_name": "Unlimited Plan"
},
"brands": {
"id": 1,
"name": "MyBrand"
}
}
],
"pagination": {
"total": 25,
"per_page": 10,
"current_page": 1,
"last_page": 3,
"next_page_url": "https://your-domain.com/api/customer/orders?page=2",
"prev_page_url": null
}
}
This endpoint retrieves the details of a specific order (transaction) for the authenticated customer using the transaction's public ID.
Authentication: This API requires authentication using a Customer Bearer Token.
The public ID of the transaction.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/orders/PUB123456';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Orders fetched successfully.",
"data": {
"transaction_id": "PUB123456",
"mdn": "1234567890",
"sim_no": "SIM123456789",
"sim_type": "physical",
"status": "success",
"price": "50.00",
"total_price": "55.00",
"type": "activation",
"plan_id": 5,
"plan_details": {
"plan_name": "Unlimited Plan",
"data": "10GB",
"validity": "30 days"
},
"created_at": "2026-04-01 10:00:00"
}
}
This endpoint retrieves usage data (such as data, talk, and text usage) for a specific transaction using its public ID.
Authentication: This API requires authentication using a Customer Bearer Token.
Fetch usage details for a transaction.
The public ID of the transaction.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/usage/PUB123456
---';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"data": {
"mdn": "1234567890",
"data_used": "2.5GB",
"data_remaining": "7.5GB",
"talk_used": "120 mins",
"text_used": "50",
"plan": "Unlimited Plan",
"expiry_date": "2026-04-30"
}
}
This endpoint retrieves a paginated list of autopay records for the authenticated customer. It includes related transaction and plan details for each autopay.
Authentication: This API requires authentication using a Customer Bearer Token.
Fetch all autopays for the logged-in customer by brand.
The ID of the brand.
optional The page number for pagination.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/autopays';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'brand_id' => '1',
'page' => '1',
],
'json' => [
'brand_id' => 16,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Autopays fetched successfully.",
"data": [
{
"id": 1,
"trans_id": "TXN123456",
"status": "active",
"brand_id": 1,
"customer_id": 10,
"refill_date": "2026-04-20",
"plan_id": 5,
"transaction": {
"id": 100,
"public_id": "PUB123",
"status": "completed",
"price": "50.00",
"total_price": "55.00",
"mdn": "1234567890",
"created_at": "2026-04-01 10:00:00"
},
"plan": {
"id": 5,
"plan_name": "Unlimited Plan"
}
}
],
"pagination": {
"total": 25,
"per_page": 10,
"current_page": 1,
"last_page": 3,
"next_page_url": "https://your-domain.com/api/customer/autopays?page=2",
"prev_page_url": null
}
}
This endpoint allows a customer to cancel an active autopay request.
Authentication: This API requires authentication using a Customer Bearer Token.
Cancel an existing autopay using transaction ID.
The transaction ID of the autopay.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/customer/autopays/cancel/TXN123456';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {CUSTOMER_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'brand_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Autopay canceled successfully.",
"data": {
"trans_id": "TXN123456",
"status": "disable"
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/forgot-password';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'gbailey@example.net',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); This API requires authentication using a customer token.This Endpoint allows you to reset your password
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/reset-password';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'test@example.com',
'token' => 'abc123',
'password' => 'secret123',
'password_confirmation' => 'secret123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); This API requires authentication using a customer token.This Endpoint validate your token
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/validate-reset-token';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'gbailey@example.net',
'token' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));