Endpoint: GET /api/v3/payments
Purpose
Retrieves a list of payment records, including details about applied payments, credits, gift certificates, and associated invoices.
Use Case
Use this endpoint to view a comprehensive breakdown of payments, including amounts applied, reconciliations, and custom attributes for a specific account.
Path Parameters
No path parameters for this endpoint.
Query Parameters:
Parameter | Type | Description |
---|---|---|
limit | Integer | Specifies the maximum number of payment records to return in the response. |
order_by | String | Determines the sort order; use asc for ascending or desc for descending. |
offset | Integer | Defines the starting point for retrieving records, used for pagination. |
Request
No data is required for the request body.
Response
The response includes detailed information about active payments, such as the total amount applied, payment breakdown by method, credits, and gift certificates used. It also lists associated invoices, including their total amount, outstanding balance, and key dates. Pagination details allow for navigating through the records efficiently.
{
"payments": [
{
"status": "STATUS",
"id": "PAYMENT_ID",
"date": "DATE",
"reconcile_status": "RECONCILE_STATUS",
"total_applied": "AMOUNT",
"payment_applied": [
{
"amount": "AMOUNT",
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
}
],
"credit_applied": [
{
"amount": "AMOUNT",
"code": "CREDIT_CODE"
}
],
"gift_certificate_applied": [
{
"amount": "AMOUNT",
"code": "GIFT_CERTIFICATE_CODE"
}
],
"invoices": [
{
"applied": "AMOUNT",
"code": "INVOICE_CODE",
"due_date": "DUE_DATE",
"issue_date": "ISSUE_DATE",
"outstanding": "AMOUNT",
"total": "AMOUNT"
}
],
"created_by": "CREATOR",
"created_on": "CREATED_DATE",
"last_updated_by": "UPDATER",
"last_updated_on": "UPDATED_DATE",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
},
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
],
"custom_objects": []
}
],
"pagination": {
"records": "RECORDS",
"limit": "LIMIT",
"offset": "OFFSET",
"previous_page": "PREVIOUS_PAGE_LINK",
"next_page": "NEXT_PAGE_LINK"
}
}
Endpoint: GET /api/v3/payments/{payment_id}
Purpose
This endpoint retrieves detailed information about a specific payment, including its status, associated invoices, payment methods, and custom attributes.
Use Case
Use this endpoint to view payment details, such as the total applied amount, method, processor, invoice association, and relevant metadata for a given payment ID.
Path Parameters
Parameter | Type | Description |
---|---|---|
payment_id | String | Unique identifier of the payment record |
Request
No data is required for the request body.
Response
The response provides detailed payment information, including its status, applied payments, related invoices, metadata, and custom attributes.
{
"payment": {
"status": "STATUS",
"id": "ID",
"date": "DATE",
"reconcile_status": "RECONCILE_STATUS",
"total_applied": "TOTAL_APPLIED",
"payment_applied": [
{
"amount": AMOUNT,
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
},
{
"amount": AMOUNT,
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
},
{
"amount": AMOUNT,
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
}
],
"credit_applied": [
{
"amount": "AMOUNT",
"code": "CREDIT_CODE"
}
],
"gift_certificate_applied": [
{
"amount": AMOUNT,
"code": "GIFT_CERTIFICATE_CODE"
}
],
"invoices": [
{
"applied": "APPLIED_AMOUNT",
"code": "INVOICE_CODE",
"due_date": "DUE_DATE",
"issue_date": "ISSUE_DATE",
"outstanding": "OUTSTANDING_AMOUNT",
"total": "TOTAL_AMOUNT"
}
],
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "VALUE"
},
{
"name": "ATTRIBUTE_NAME",
"value": "VALUE"
}
],
"custom_objects": []
}
}
Endpoint: GET /api/v3/invoices/{invoice_id}/payments
Purpose
This endpoint retrieves the payment details associated with a specific invoice, including applied payments, credits, and gift certificates.
Use Case
Use this endpoint to view all payments and their associated details for a particular invoice by providing the invoice_id
.
Path Parameters
Parameter | Type | Description |
---|---|---|
invoice_id | String | Unique identifier of the invoice record. |
Request
No data is required for the request body.
Response
The response contains detailed payment information for the specified invoice, including payment status, date, applied amounts, and associated invoices. It also includes metadata such as pagination details for navigating multiple payments, along with any applied credits or gift certificates. Custom attributes and creation metadata are also provided for better traceability.
{
"invoice": {
"payments": [
{
"status": "STATUS",
"id": "PAYMENT_ID",
"date": "DATE",
"reconcile_status": "RECONCILE_STATUS",
"total_applied": "TOTAL_APPLIED",
"payment_applied": [
{
"amount": "AMOUNT",
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
},
{
"amount": "AMOUNT",
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
},
{
"amount": "AMOUNT",
"method": "METHOD",
"processor": "PROCESSOR",
"reference": "REFERENCE"
}
],
"credit_applied": [
{
"amount": "AMOUNT",
"code": "CREDIT_CODE"
}
],
"gift_certificate_applied": [
{
"amount": "AMOUNT",
"code": "GIFT_CODE"
}
],
"invoices": [
{
"applied": "APPLIED_AMOUNT",
"code": "INVOICE_CODE",
"due_date": "DUE_DATE",
"issue_date": "ISSUE_DATE",
"outstanding": "OUTSTANDING_AMOUNT",
"total": "TOTAL_AMOUNT"
}
],
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "CUSTOM_ATTRIBUTE_NAME",
"value": "CUSTOM_ATTRIBUTE_VALUE"
},
{
"name": "CUSTOM_ATTRIBUTE_NAME",
"value": "CUSTOM_ATTRIBUTE_VALUE"
}
],
"custom_objects": []
}
],
"pagination": {
"records": "RECORD_COUNT",
"limit": "LIMIT",
"offset": "OFFSET",
"previous_page": "PREVIOUS_PAGE",
"next_page": "NEXT_PAGE"
}
}
}