Aller au contenu

GET /v1/invoices/{id}/payments

GET
/v1/invoices/{id}/payments
curl --request GET \
--url https://api.asap.cool/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payments \
--header 'Authorization: Bearer <token>'
id
required
string format: uuid

Document identifier.

Payments and aggregate balance/status.

Media type application/json

The full payment listing plus the aggregate balance/status.

object
payments
required

Payments against the document, newest first.

Array<object>

Public projection of a [Payment].

object
amount
required

Amount received, in cents.

integer format: int64
created_at
required

RFC3339 creation timestamp.

string
document_id
required

Document the payment settles.

string format: uuid
id
required

Stable identifier.

string format: uuid
method

Payment method (free-form).

string | null
paid_at
required

RFC3339 settlement timestamp.

string
reference

Free-form payment reference.

string | null
remaining_due
required

total_ttc - total_paid, in cents.

integer format: int64
status
required

Current document status.

string
total_paid
required

Sum of all payments, in cents.

integer format: int64
Example generated
{
"payments": [
{
"amount": 1,
"created_at": "example",
"document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"method": "example",
"paid_at": "example",
"reference": "example"
}
],
"remaining_due": 1,
"status": "example",
"total_paid": 1
}

No active org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Missing invoice:read scope.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Not found or cross-org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}