ID Mobile API — Billing
Use this endpoint to retrieve a billing statement or proof of
address from the operator, with user consent. The process involves
two steps: initiate the consent request, then retrieve the document.
Two-step flow - First call /IDMOBILE/
to request the user's consent and get the operator's consent
page URL. Once consent is complete, call /GET/ to
retrieve the billing document.
Related ID Mobile documentation:
⬇ Download OpenAPI 3.0.0 spec (JSON) ⬇ Download AI/LLM reference (.md)
Step 1 of 2 — Request consent
Initiate the consent request and get the URL to the operator's
consent page.
Step 1 — Initiate consent request
Request
Both GET and POST are supported.
{SERVER_ADDRESS} and {LICENCE_CODE}
are provided by DQE upon account creation. Contact your DQE account
manager to obtain these credentials.
GET POST
GET https://{SERVER_ADDRESS}/IDMOBILE/?number ={NUM}&token ={TOKEN}&mode ={MODE}&name ={NAME}&code_name ={CODE_NAME}&licence ={LICENCE_CODE}&scope =billing&redirect_uri ={URL_REDIRECT}
Code examples
Request consent to retrieve the billing document
cURL JavaScript Python PHP Node.js Java C# Go
curl "https://{SERVER_ADDRESS}/IDMOBILE/?number={NUM}&token={TOKEN}&mode={MODE}&name={NAME}&code_name={CODE_NAME}&licence={LICENCE_CODE}&scope=billing&redirect_uri={URL_REDIRECT}"
fetch("https://{SERVER_ADDRESS}/IDMOBILE/?" +
new URLSearchParams({
number: "{NUM}",
token: "{TOKEN}",
mode: "{MODE}",
name: "{NAME}",
code_name: "{CODE_NAME}",
licence: "{LICENCE_CODE}",
scope: "billing",
redirect_uri: "{URL_REDIRECT}"
}))
.then(r => r.json())
.then(data => console.log(data));
import requests
response = requests.get(
"https://{SERVER_ADDRESS}/IDMOBILE/",
params={
"number": "{NUM}",
"token": "{TOKEN}",
"mode": "{MODE}",
"name": "{NAME}",
"code_name": "{CODE_NAME}",
"licence": "{LICENCE_CODE}",
"scope": "billing",
"redirect_uri": "{URL_REDIRECT}",
},
)
print(response.json())
<?php
$params = http_build_query([
'number' => '{NUM}',
'token' => '{TOKEN}',
'mode' => '{MODE}',
'name' => '{NAME}',
'code_name' => '{CODE_NAME}',
'licence' => '{LICENCE_CODE}',
'scope' => 'billing',
'redirect_uri' => '{URL_REDIRECT}',
]);
$ch = curl_init("https://{SERVER_ADDRESS}/IDMOBILE/?{$params}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
const axios = require('axios');
axios.get('https://{SERVER_ADDRESS}/IDMOBILE/',
{
params: {
number: '{NUM}',
token: '{TOKEN}',
mode: '{MODE}',
name: '{NAME}',
code_name: '{CODE_NAME}',
licence: '{LICENCE_CODE}',
scope: 'billing',
redirect_uri: '{URL_REDIRECT}'
}
})
.then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient();
String url = "https://{SERVER_ADDRESS}/IDMOBILE/"
+ "?number={NUM}&token={TOKEN}&mode={MODE}&name={NAME}&code_name={CODE_NAME}&licence={LICENCE_CODE}&scope=billing&redirect_uri={URL_REDIRECT}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using var client = new HttpClient();
var url = "https://{SERVER_ADDRESS}/IDMOBILE/"
+
"?number={NUM}&token={TOKEN}&mode={MODE}&name={NAME}&code_name={CODE_NAME}&licence={LICENCE_CODE}&scope=billing&redirect_uri={URL_REDIRECT}";
var response = await client.GetAsync(url);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://{SERVER_ADDRESS}/IDMOBILE/" +
"?number={NUM}&token={TOKEN}&mode={MODE}&name={NAME}&code_name={CODE_NAME}&licence={LICENCE_CODE}&scope=billing&redirect_uri={URL_REDIRECT}"
resp, err := http.Get(url)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://{SERVER_ADDRESS}/IDMOBILE/
Add the following parameters in the request body using
x-www-form-urlencoded.
Code examples
Request consent to retrieve the billing document
cURL JavaScript Python PHP Node.js Java C# Go
curl -X POST "https://{SERVER_ADDRESS}/IDMOBILE/"
\
-H "Content-Type: application/x-www-form-urlencoded"
\
-d "licence={LICENCE_CODE}" \
-d "number={NUM}" \
-d "token={TOKEN}" \
-d "mode={MODE}" \
-d "name={NAME}" \
-d "code_name={CODE_NAME}" \
-d "scope=billing" \
-d "redirect_uri={URL_REDIRECT}"
fetch("https://{SERVER_ADDRESS}/IDMOBILE/", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded"
},
body: new URLSearchParams({
licence: "{LICENCE_CODE}",
number: "{NUM}",
token: "{TOKEN}",
mode: "{MODE}",
name: "{NAME}",
code_name: "{CODE_NAME}",
scope: "billing",
redirect_uri: "{URL_REDIRECT}"
})
})
.then(r => r.json())
.then(data => console.log(data));
import requests
response = requests.post(
"https://{SERVER_ADDRESS}/IDMOBILE/",
data={
"licence": "{LICENCE_CODE}",
"number": "{NUM}",
"token": "{TOKEN}",
"mode": "{MODE}",
"name": "{NAME}",
"code_name": "{CODE_NAME}",
"scope": "billing",
"redirect_uri": "{URL_REDIRECT}",
},
)
print(response.json())
<?php
$ch = curl_init("https://{SERVER_ADDRESS}/IDMOBILE/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'licence' => '{LICENCE_CODE}',
'number' => '{NUM}',
'token' => '{TOKEN}',
'mode' => '{MODE}',
'name' => '{NAME}',
'code_name' => '{CODE_NAME}',
'scope' => 'billing',
'redirect_uri' => '{URL_REDIRECT}',
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
const axios = require('axios');
const qs = require('querystring');
axios.post('https://{SERVER_ADDRESS}/IDMOBILE/',
qs.stringify({
licence: '{LICENCE_CODE}',
number: '{NUM}',
token: '{TOKEN}',
mode: '{MODE}',
name: '{NAME}',
code_name: '{CODE_NAME}',
scope: 'billing',
redirect_uri: '{URL_REDIRECT}'
}))
.then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient();
String form = "licence={LICENCE_CODE}&number={NUM}&token={TOKEN}&mode={MODE}&name={NAME}&code_name={CODE_NAME}&scope=billing&redirect_uri={URL_REDIRECT}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://{SERVER_ADDRESS}/IDMOBILE/"))
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(form))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using var client = new HttpClient();
var form = new Dictionary<string, string>
{
["licence"] = "{LICENCE_CODE}",
["number"] = "{NUM}",
["token"] = "{TOKEN}",
["mode"] = "{MODE}",
["name"] = "{NAME}",
["code_name"] = "{CODE_NAME}",
["scope"] = "billing",
["redirect_uri"] = "{URL_REDIRECT}"
};
var response = await client.PostAsync(
"https://{SERVER_ADDRESS}/IDMOBILE/",
new FormUrlEncodedContent(form));
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
form := url.Values{}
form.Set("licence", "{LICENCE_CODE}")
form.Set("number", "{NUM}")
form.Set("token", "{TOKEN}")
form.Set("mode", "{MODE}")
form.Set("name", "{NAME}")
form.Set("code_name", "{CODE_NAME}")
form.Set("scope", "billing")
form.Set("redirect_uri", "{URL_REDIRECT}")
resp, err := http.PostForm("https://{SERVER_ADDRESS}/IDMOBILE/",
form)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Parameters
Parameter
Description
Mand / Opt
SERVER_ADDRESS
Address of the DQE server that will process the data.
Mandatory
licence
Number assigned to you as your licence code.
Mandatory
number
Phone number.
Mandatory
token
Token retrieved through authentication.
Mandatory
mode
2: authentication by code.
Fixed value: 2
Mandatory
name
Partner name in the DQE Software database, usually
your company name.
Mandatory
code_name
Optional field containing a code associated with
name.
Optional
scope
Static value. Must be billing for this
scope.
Fixed value: billing
Mandatory
redirect_uri
Redirection URL. DQE adds the session token and status
to the redirect.
Optional
Combining scopes — billing can
be combined with formfilling (both are consent-based)
in a single request, e.g. scope=billing,formfilling,
and with info (phone number intelligence) in any
combination, e.g. scope=billing,info. See the
info fields below. Contact your DQE account manager
for guidance on the full combined billing+formfilling
response shape.
info add-on fields — returned in addition to this
endpoint's own fields when info is included in
scope:
Field
Description
Example
telorigine
Phone number in the request.
0600000000
tel
Phone number, formatted.
+33600000000
geolocation
Geographic situation of the phone number.
FRANCE
operator
Current operator of the phone number, if subscribed.
ORANGE
oldoperator
Previous operator of the phone number.
SFR
ported
Indicates if the phone number is ported, if subscribed.
Y
type
Type of the phone number.
MOBILE
iderror
Error code of the check (0 or 1).
1
Response
If the request succeeds, the API returns a JSON object containing
the following keys.
Key
Description
Type
status
success: information was successfully
retrieved.
STRING
scope
billing
STRING
billing
Proof of address in Base64 encoding.
STRING
Pending
Key
Description
Type
status
pending: DQE is waiting for the operator
response.
STRING
scope
billing
STRING
Response example
Successful consent request
{
"status" :
"success" ,
"scope" : "billing" ,
"billing" :
"N0YXJ0eHJlZgo0OTg2MQolJUVPRgoKLS1ZS0xJNTYpPUlSeFdNUzEoYXJpOWI/UklzLkRXZ1dwUF9FLS0K"
}
Pending — waiting for the operator
{
"status" :
"pending" ,
"scope" : "billing"
}
Errors
Error ID
Error type
Description
01
invalid request
The request is not valid.
02
invalid licence key
The licence is not valid.
04
invalid scope
Invalid scope.
05
missing or empty parameter (user_infos) for this scope
A parameter is missing for the requested scope.
06
bad parameter format (user_infos) is not a valid JSON
The user_infos parameter is not valid
JSON.
07
missing mandatory key in user informations (phone)
The phone key is mandatory in the
user_infos parameter for this operator.
09
ineligible phone number
The phone number is not eligible for the solution.
10
invalid phone number
The phone number does not exist.
11
phone number is empty
The phone number is empty.
12
phone check failed
The operator verification failed.
13
operator [Operator Name] not found
The operator could not be found.
14
operator [Operator Name] not authorized for this licence
Your licence is not authorised for this operator.
15
operator [Operator Name] not supported yet
The solution is not yet available for this operator.
16
operator [Operator Name] unreachable
The operator could not be contacted.
17
scope not supported by this operator [Operator Name] yet
This scope is not supported by the operator.
30
invalid or expired token
The token has expired.
Test the API
Click the button below to test this endpoint live in your browser.
Open console
Step 2 of 2 — Retrieve billing document
Once the user has given consent, retrieve the billing document
returned by the operator.
Step 2 — Retrieve billing document
Request
Both GET and POST are supported.
{SERVER_ADDRESS} and {LICENCE_CODE}
are provided by DQE upon account creation. Contact your DQE account
manager to obtain these credentials.
GET POST
GET https://{SERVER_ADDRESS}/GET/?token ={TOKEN}&Licence ={LICENCE_CODE}&scope =billing
Code examples
Retrieve the billing document once consent is complete
cURL JavaScript Python PHP Node.js Java C# Go
curl "https://{SERVER_ADDRESS}/GET/?token={TOKEN}&Licence={LICENCE_CODE}&scope=billing"
fetch("https://{SERVER_ADDRESS}/GET/?" + new
URLSearchParams({
token: "{TOKEN}",
Licence: "{LICENCE_CODE}",
scope: "billing"
}))
.then(r => r.json())
.then(data => console.log(data));
import requests
response = requests.get(
"https://{SERVER_ADDRESS}/GET/",
params={
"token": "{TOKEN}",
"Licence": "{LICENCE_CODE}",
"scope": "billing",
},
)
print(response.json())
<?php
$params = http_build_query([
'token' => '{TOKEN}',
'Licence' => '{LICENCE_CODE}',
'scope' => 'billing',
]);
$ch = curl_init("https://{SERVER_ADDRESS}/GET/?{$params}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
const axios = require('axios');
axios.get('https://{SERVER_ADDRESS}/GET/', {
params: {
token: '{TOKEN}',
Licence: '{LICENCE_CODE}',
scope: 'billing'
}
})
.then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient();
String url = "https://{SERVER_ADDRESS}/GET/"
+ "?token={TOKEN}&Licence={LICENCE_CODE}&scope=billing";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using var client = new HttpClient();
var url = "https://{SERVER_ADDRESS}/GET/" +
"?token={TOKEN}&Licence={LICENCE_CODE}&scope=billing";
var response = await client.GetAsync(url);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://{SERVER_ADDRESS}/GET/" +
"?token={TOKEN}&Licence={LICENCE_CODE}&scope=billing"
resp, err := http.Get(url)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://{SERVER_ADDRESS}/GET/
Add the following parameters in the request body using
x-www-form-urlencoded.
Code examples
Retrieve the billing document once consent is complete
cURL JavaScript Python PHP Node.js Java C# Go
curl -X POST "https://{SERVER_ADDRESS}/GET/"
\
-H "Content-Type: application/x-www-form-urlencoded"
\
-d "Licence={LICENCE_CODE}" \
-d "token={TOKEN}" \
-d "scope=billing"
fetch("https://{SERVER_ADDRESS}/GET/", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded"
},
body: new URLSearchParams({
Licence: "{LICENCE_CODE}",
token: "{TOKEN}",
scope: "billing"
})
})
.then(r => r.json())
.then(data => console.log(data));
import requests
response = requests.post(
"https://{SERVER_ADDRESS}/GET/",
data={
"Licence": "{LICENCE_CODE}",
"token": "{TOKEN}",
"scope": "billing",
},
)
print(response.json())
<?php
$ch = curl_init("https://{SERVER_ADDRESS}/GET/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'Licence' => '{LICENCE_CODE}',
'token' => '{TOKEN}',
'scope' => 'billing',
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
const axios = require('axios');
const qs = require('querystring');
axios.post('https://{SERVER_ADDRESS}/GET/', qs.stringify({
Licence: '{LICENCE_CODE}',
token: '{TOKEN}',
scope: 'billing'
}))
.then(response => console.log(response.data));
HttpClient client = HttpClient.newHttpClient();
String form = "Licence={LICENCE_CODE}&token={TOKEN}&scope=billing";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://{SERVER_ADDRESS}/GET/"))
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(form))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using var client = new HttpClient();
var form = new Dictionary<string, string>
{
["Licence"] = "{LICENCE_CODE}",
["token"] = "{TOKEN}",
["scope"] = "billing"
};
var response = await client.PostAsync(
"https://{SERVER_ADDRESS}/GET/",
new FormUrlEncodedContent(form));
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
form := url.Values{}
form.Set("Licence", "{LICENCE_CODE}")
form.Set("token", "{TOKEN}")
form.Set("scope", "billing")
resp, err := http.PostForm("https://{SERVER_ADDRESS}/GET/",
form)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Parameters
Parameter
Description
Mand / Opt
SERVER_ADDRESS
Address of the DQE server that will process the data.
Mandatory
Licence
Number assigned to you as your licence code.
Mandatory
token
Token retrieved through authentication.
Mandatory
scope
Static value. Must be billing for this
scope.
Fixed value: billing
Mandatory
Response
The API returns a JSON object containing the following keys:
Key
Description
Type
status
success: document was successfully retrieved.
STRING
scope
billing
STRING
billing
Proof of address in Base64 encoding.
STRING
Pending
Key
Description
Type
status
pending: DQE is waiting for the operator
response.
STRING
scope
billing
STRING
Response example
Successful retrieval
{
"status" :
"success" ,
"scope" : "billing" ,
"billing" :
"N0YXJ0eHJlZgo0OTg2MQolJUVPRgoKLS1ZS0xJNTYpPUlSeFdNUzEoYXJpOWI/UklzLkRXZ1dwUF9FLS0K"
}
Error
{
"status" : "error" ,
"error_type" :
"internal server error" ,
"error_id" : "99"
}
Errors
Error ID
Error type
Description
01
invalid request
The request is not valid.
02
invalid licence key
The licence is not valid.
04
invalid scope
Invalid scope.
18
failed to retrieve data from operator
No data was received after OTP validation.
20
OTP incorrect
OTP validation was not completed.
21
access denied
OTP validation was declined.
30
invalid or expired token
The token has expired.
99
internal server error
Server error.
Test the API
Click the button below to test this endpoint live in your browser.
Open console