Aller au contenu
Sur cette page

Payment

Payment recording, refunds, and per-invoice payment summaries

Get payment summary for an invoice

GET /api/v1/invoices/{invoiceId}/payments/summary

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
invoiceId path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X GET "https://app.encryptinvoice.com/api/v1/invoices/{invoiceId}/payments/summary" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Display a listing of payments

GET /api/v1/payments

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
invoice_id query string non
status query string non
payment_method query string non
per_page query string non

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X GET "https://app.encryptinvoice.com/api/v1/payments" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Store a newly created payment

POST /api/v1/payments

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Corps de la requête

Champ Type Requis Description
invoice_id integer oui
amount number oui
payment_date string oui
payment_method string oui
reference string non
notes string non

Réponses

Statut Description
422
201 For non-paginated data, return as before

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/payments" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": 1,
    "amount": 1,
    "payment_date": "string",
    "payment_method": "string",
    "reference": "string",
    "notes": "string"
}'

Display the specified payment

GET /api/v1/payments/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before

Exemple de requête

curl -X GET "https://app.encryptinvoice.com/api/v1/payments/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Update the specified payment

PUT /api/v1/payments/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
payment_date string non
payment_method string non
reference string non
notes string non

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X PUT "https://app.encryptinvoice.com/api/v1/payments/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_date": "string",
    "payment_method": "string",
    "reference": "string",
    "notes": "string"
}'

Remove the specified payment (soft delete)

DELETE /api/v1/payments/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X DELETE "https://app.encryptinvoice.com/api/v1/payments/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Refund a payment

POST /api/v1/payments/{id}/refund

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
reason string non
amount number non

Réponses

Statut Description
422
200 For non-paginated data, return as before

Exemple de requête

curl -X POST "https://app.encryptinvoice.com/api/v1/payments/{id}/refund" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string",
    "amount": 1
}'

Nous utilisons des cookies et des analyses respectueuses de la vie privée

Nous utilisons des cookies essentiels pour l'authentification et des analyses respectueuses de la vie privée (auto-hébergées, respectent Do Not Track). Aucun suivi publicitaire ou tiers. En savoir plus dans notre Politique de confidentialité