Crea un link di pagamento
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>"
}
}Fatture e pagamenti
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).
POST
/
payment-links
Crea un link di pagamento
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
Headers
Body
application/json
Response
Il link creato (o, con una chiave di prova, quello che sarebbe).