curl --request POST \
--url https://api.dentalspace.ai/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
invoiceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
installmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>'
})
};
fetch('https://api.dentalspace.ai/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/payment-links"
payload = {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"livemode": true,
"amount": 123,
"currency": "eur",
"expiresAt": "<string>",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Crea un link di pagamento
Scope: billing:write.
Un link Stripe (Checkout, sul conto collegato della clinica) per il residuo di una fattura emessa o scaduta, o di una rata non pagata. L’importo non si sceglie. Non invia niente: restituisce l’URL. Chiede Idempotency-Key. Con una chiave di prova verifica tutto ma non crea il link (livemode: false, url: null).
curl --request POST \
--url https://api.dentalspace.ai/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
invoiceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
installmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>'
})
};
fetch('https://api.dentalspace.ai/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/payment-links"
payload = {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"livemode": true,
"amount": 123,
"currency": "eur",
"expiresAt": "<string>",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Obbligatoria. La stessa chiave entro 24 ore ripete la prima risposta 2xx.
255Body
La fattura da incassare (emessa o scaduta).
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Oppure la rata di un piano di pagamento.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Cio' che il paziente legge su Stripe. Predefinito: «Prestazione odontoiatrica».
1 - 200Response
Il link creato (o, con una chiave di prova, quello che sarebbe).
null con una chiave di prova: nessun link creato.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$L'indirizzo di Stripe da mandare al paziente; scade dopo un'ora. null con una chiave di prova.
false con una chiave di prova (dsk_test_): niente passa da Stripe.
In euro: il residuo della fattura o della rata al momento della creazione.
"eur"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$