Retrieve an invoice
Retrieve an invoice by ID.
To access this endpoint using an access token
you'll need to specify the /accounts/{accountID}/invoices.read scope.
curl -X GET "https://api.moov.io/accounts/{accountID}/invoices/{invoiceID}" \
-H "Authorization: Bearer {token}" \
using Moov.Sdk;
var sdk = new MoovClient(xMoovVersion: "<value>");
var res = await sdk.Invoices.GetInvoiceAsync(
accountID: "3ecce96f-a052-4c96-b389-98e880af1ab4",
invoiceID: "fc90d016-39ea-4110-b77a-2e1c95827f46"
);
// handle responsepackage hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetInvoiceResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.xMoovVersion("<value>")
.security(Security.builder()
.username("")
.password("")
.build())
.build();
GetInvoiceResponse res = sdk.invoices().getInvoice()
.accountID("3ecce96f-a052-4c96-b389-98e880af1ab4")
.invoiceID("fc90d016-39ea-4110-b77a-2e1c95827f46")
.call();
if (res.invoice().isPresent()) {
// handle response
}
}
}require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
x_moov_version: '<value>',
)
res = s.invoices.get_invoice(account_id: '3ecce96f-a052-4c96-b389-98e880af1ab4', invoice_id: 'fc90d016-39ea-4110-b77a-2e1c95827f46')
unless res.invoice.nil?
# handle response
endimport { Moov } from "@moovio/sdk";
const moov = new Moov({
xMoovVersion: "<value>",
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.invoices.getInvoice({
accountID: "3ecce96f-a052-4c96-b389-98e880af1ab4",
invoiceID: "fc90d016-39ea-4110-b77a-2e1c95827f46",
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
$sdk = MoovPhp\Moov::builder()
->setXMoovVersion('<value>')
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$response = $sdk->invoices->getInvoice(
accountID: '3ecce96f-a052-4c96-b389-98e880af1ab4',
invoiceID: 'fc90d016-39ea-4110-b77a-2e1c95827f46'
);
if ($response->invoice !== null) {
// handle response
}from moovio_sdk import Moov
from moovio_sdk.models import components
with Moov(
x_moov_version="<value>",
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.invoices.get_invoice(account_id="3ecce96f-a052-4c96-b389-98e880af1ab4", invoice_id="fc90d016-39ea-4110-b77a-2e1c95827f46")
# Handle response
print(res){
"createdOn": "2024-05-06T12:20:38.184Z",
"customerAccountID": "3dfff852-927d-47e8-822c-2fffc57ff6b9",
"description": "Professional services for Q1 2026",
"disputedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"dueDate": "2026-02-15T00:00:00Z",
"invoiceDate": "2026-01-15T00:00:00Z",
"invoiceID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"invoiceNumber": "INV-1001",
"invoicePayments": [
{
"amount": {
"currency": "USD",
"valueDecimal": "1080.00"
},
"invoicePaymentID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"invoicePaymentType": "transfer",
"transfer": {
"transferID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
}
}
],
"lineItems": {
"items": [
{
"basePrice": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"name": "Professional Services",
"quantity": 1
}
]
},
"paidAmount": {
"currency": "USD",
"valueDecimal": "1080.00"
},
"paidOn": "2026-01-20T14:45:00Z",
"partnerAccountID": "5dfff852-927d-47e8-822c-2fffc57ff6b8",
"pendingAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"refundedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"sentOn": "2026-01-15T10:30:00Z",
"status": "paid",
"subtotalAmount": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"taxAmount": {
"currency": "USD",
"valueDecimal": "80.00"
},
"totalAmount": {
"currency": "USD",
"valueDecimal": "1080.00"
}
}Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Headers
X-Moov-Version
string
Specify an API version.
API versioning follows the format vYYYY.QQ.BB, where
YYYYis the yearQQis the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)BBis the build number, starting at.01, for subsequent builds in the same quarter.- For example,
v2024.01.00is the initial release of the first quarter of 2024.
- For example,
The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
When no version is specified, the API defaults to v2024.01.00.
Path parameters
accountID
string
required
invoiceID
string
required
Response
createdOn
string<date-time>
required
customerAccountID
string
<=36 characters
required
disputedAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
invoiceID
string
<=36 characters
required
invoiceNumber
string
required
lineItems
object
required
Show child attributes
items
array<object>
required
Show child attributes
basePrice
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
images
array<object>
options
array<object>
Show child attributes
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
group
string
<=100 characters
images
array<object>
Show child attributes
altText
string
<=125 characters
imageID
string
<=36 characters
link
string<uri>
publicID
string
Pattern
priceModifier
object
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
productID
string
paidAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
partnerAccountID
string
<=36 characters
required
pendingAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
refundedAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
status
string<enum>
required
draft,
unpaid,
payment-pending,
paid,
overdue,
canceled
subtotalAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
taxAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
totalAmount
object
required
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
canceledOn
string<date-time>
description
string
dueDate
string<date-time>
invoiceDate
string<date-time>
invoicePayments
array<object>
Show child attributes
amount
object
Show child attributes
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
external
object
Show child attributes
description
string
foreignID
string
paymentDate
string<date-time>
invoicePaymentID
string
<=36 characters
invoicePaymentType
string<enum>
transfer,
external
transfer
object
Show child attributes
transferID
string
<=36 characters
required
paidOn
string<date-time>
paymentLinkCode
string
sentOn
string<date-time>