Skip to content
On this page

Payment

Payment recording, refunds, and per-invoice payment summaries

Get payment summary for an invoice

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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
invoiceId path integer yes

Responses

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

Example request

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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
invoice_id query string no
status query string no
payment_method query string no
per_page query string no

Responses

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

Example request

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

Requires authentication (Bearer token) and the X-Organization-Id header.

Request body

Field Type Required Description
invoice_id integer yes
amount number yes
payment_date string yes
payment_method string yes
reference string no
notes string no

Responses

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

Example request

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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

Field Type Required Description
payment_date string no
payment_method string no
reference string no
notes string no

Responses

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

Example request

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}

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Responses

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

Example request

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

Requires authentication (Bearer token) and the X-Organization-Id header.

Parameters

Name In Type Required Description
id path integer yes

Request body

Field Type Required Description
reason string no
amount number no

Responses

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

Example request

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
}'

We use cookies and privacy-respecting analytics

We use essential cookies for authentication and privacy-respecting analytics (self-hosted, respects Do Not Track). No advertising or third-party tracking. Learn more in our Privacy Policy