Request a service
curl --request POST \
--url https://api.tilta.io/v1/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"invoice_external_id": "<string>",
"terms_accepted_at": 123,
"paid_out_at": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
invoice_external_id: '<string>',
terms_accepted_at: 123,
paid_out_at: 123
})
};
fetch('https://api.tilta.io/v1/services', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/services"
payload = {
"external_id": "<string>",
"invoice_external_id": "<string>",
"terms_accepted_at": 123,
"paid_out_at": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'invoice_external_id' => '<string>',
'terms_accepted_at' => 123,
'paid_out_at' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"external_id": "<string>",
"invoice_external_id": "<string>",
"service_type": "FINANCING",
"status": "IN_REVIEW",
"created_at": 123,
"updated_at": 123,
"requirements": [
{
"code": "INVOICE_INELIGIBLE",
"description": "<string>"
}
],
"advance": {
"value": 123
},
"fee": {
"gross": 123,
"net": 123,
"tax": 123
}
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}Platform & Utilities
Request a service
Activate financing, insurance, or collection on a captured invoice. Requesting a Service is what triggers the funding flow.
POST
/
v1
/
services
Request a service
curl --request POST \
--url https://api.tilta.io/v1/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"invoice_external_id": "<string>",
"terms_accepted_at": 123,
"paid_out_at": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
invoice_external_id: '<string>',
terms_accepted_at: 123,
paid_out_at: 123
})
};
fetch('https://api.tilta.io/v1/services', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/services"
payload = {
"external_id": "<string>",
"invoice_external_id": "<string>",
"terms_accepted_at": 123,
"paid_out_at": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'invoice_external_id' => '<string>',
'terms_accepted_at' => 123,
'paid_out_at' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"external_id": "<string>",
"invoice_external_id": "<string>",
"service_type": "FINANCING",
"status": "IN_REVIEW",
"created_at": 123,
"updated_at": 123,
"requirements": [
{
"code": "INVOICE_INELIGIBLE",
"description": "<string>"
}
],
"advance": {
"value": 123
},
"fee": {
"gross": 123,
"net": 123,
"tax": 123
}
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}Requesting a Service is what triggers the funding flow: once the Service is active on an invoice, Tilta finances the receivable and initiates payout to the merchant.
Confirm the invoice satisfies every prerequisite with Service
Requirements before requesting the Service.
Listen for the Service status webhook event to learn when a Service becomes active and funding is in progress, rather than
polling.
Authorizations
Your Tilta API key, sent as Bearer <key>.
Body
application/json
Unique identifier of the invoice service.
Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Unique identifier of the invoice.
Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Available options:
FINANCING, INSURANCE, COLLECTION Timestamp when the payout should be made (unix time in seconds).
Response
Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Available options:
FINANCING, INSURANCE, COLLECTION Available options:
IN_REVIEW, ACCEPTED, REJECTED, CANCELLED, PAID_OUT, SETTLED, DEFAULTED, CLAIM_NOTIFIED, CLAIM_IN_ASSESSMENT, CLAIM_PAID, CLAIM_DENIED, COVER_EXPIRED, EARLY_COLLECTION, LATE_COLLECTION, COLLECTED, UNCOLLECTIBLE Show child attributes
Show child attributes
Advance amount paid out to the merchant for this invoice. Each invoice receives its own SEPA transfer (or N transfers when split above 100K), with the invoice number leading the remittance information for startsWith reconciliation.
Show child attributes
Show child attributes
Fees applied to this invoice, in the smallest currency unit. gross = net + tax.
Show child attributes
Show child attributes