Skip to main content

Payment API

Christopher Ike avatar
Written by Christopher Ike
Updated over a week ago

You can access payments in Uphance account using these API calls. You can retrieve all payments, view a specific payment, or create a new payment for a sale or invoice.

GET all payments

Retrieve a paginated list of payments. This endpoint returns a maximum of 100 payments per page.

curl "https://api.uphance.com/payments?page=1&since_id=123&since_created_at=2023-01-01" \ 
-H "Authorization: Bearer ACCESS_TOKEN"

Query Parameters:

page – (optional) Page number to fetch (default is 1).

since_id – (optional) Return only payments with ID greater than the specified ID.

since_created_at – (optional) Return only payments created after the specified date (ISO 8601 format).

order_id – (optional) Return payments associated with a specific sale order ID.

Example Response:

{
"payments": [
{
"id": 70732,
"created_at": "2023-05-25T04:48:27.000-05:00",
"updated_at": "2023-05-25T04:48:27.000-05:00",
"amount": "36.98",
"reference": "2763526384",
"date": "2023-05-25T00:00:00.000-05:00",
"sale_id": 113993,
"company_id": 59453,
"invoice_id": 112428,
"source": "Bank transfer"
},
{
"id": 70953,
"created_at": "2025-10-09T08:07:09.000-05:00",
"updated_at": "2025-10-09T08:07:09.000-05:00",
"amount": "441.0",
"reference": "23863455362",
"date": "2025-10-09T00:00:00.000-05:00",
"sale_id": 114903,
"company_id": 60983,
"invoice_id": 113206,
"source": "Cash"
}
],
"meta": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 2
}
}

GET a single payment

Retrieve details of a single payment by ID.

curl https://api.uphance.com/payments/:id \
-H "Authorization: ACCESS_TOKEN"

If the payment is not found, a 404 Not Found error will be returned.

POST create a payment

Create a new payment for a sale, optionally linked to a specific invoice. If the payment amount exceeds the outstanding invoice balance, an overpayment (credit note) will be created automatically.

curl -X POST https://api.uphance.com/payments \
-H "Authorization: Bearer ACCESS_TOKEN"

Example Request Body:

{
"sale_id": 114903,
"invoice_id": 113206,
"amount": 441.00,
"source": "Cash",
"reference": 12345,
"date": "2025-10-09"
}

Request Body Parameters:

sale_id (number, required): The ID of the sale to which this payment applies.

invoice_id (number, optional): The ID of the invoice to apply payment to.

amount (decimal, required): The amount of the payment.

source (string, optional): The source of the payment. One of: Credit card, Bank cheque, Bank transfer, Cash, Other.

Reference (string, optional): A string reference for the payment (e.g., transaction or cheque number)

date (string, optional): Date of the payment (format: YYYY-MM-DD).

If the payment amount is greater than the invoice balance, the remainder is applied as a credit note (overpayment).

Example response:

{
"payments": {
"id": 70954,
"created_at": "2025-10-09T08:44:47.008-05:00",
"updated_at": "2025-10-09T08:44:47.008-05:00",
"amount": "441.0",
"reference": "12345",
"date": "2025-10-09T00:00:00.000-05:00",
"sale_id": 114903,
"company_id": 60983,
"invoice_id": 113206,
"source": "Cash"
}
}

Did this answer your question?