Airwallex logo

BillsBeta

Copy for LLMView as Markdown

Manages bills representing accounts payable obligations. Supports retrieval, listing with filters, and sync status updates for integration with external accounting systems.

Endpoints
GET /api/v1/spend/bills
GET /api/v1/spend/bills/{id}
POST /api/v1/spend/bills/{id}/mark_as_paid
POST /api/v1/spend/bills/{id}/sync
POST /api/v1/spend/bills/create

List bills

GET /api/v1/spend/bills

Returns a list of bills filtered by the specified query parameters.

Parameters
from_created_atstring

Filter by bills created after this timestamp (inclusive) in ISO8601 format. If not specified, defaults to last 30 days from to_created_at.

from_updated_atstring

Filter by bills updated after this timestamp (inclusive) in ISO8601 format.

legal_entity_idstring

Filter by legal entity unique identifier.

pagestring

A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call.

purchase_order_idstring

Filter by purchase order unique identifier.

statusstring

Filter by bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

sync_statusstring

Filter by sync status. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

to_created_atstring

Filter by bills created before this timestamp (exclusive) in ISO8601 format. If not specified, defaults to now.

to_updated_atstring

Filter by bills updated before this timestamp (exclusive) in ISO8601 format.

Response body - 200 OK
itemsarray

List of items returned.

items.approversarray

List of user emails who can approve the bill.

items.attachmentsarray

List of file attachments associated with the bill.

items.attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

items.attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

items.attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

items.attachments.idstring

Unique identifier of the attachment.

items.bill_paymentsarray

List of payments applied to the bill.

items.bill_payments.amountstring

Amount of the payment.

items.bill_payments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.bill_payments.currencystring

Currency of the payment, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

items.bill_payments.idstring

Unique identifier of the payment.

items.bill_payments.typestring

Payment method type. Possible values are TRANSFER, CARD_TRANSACTION, EXTERNAL.

items.bill_payments.card_transactionobject

Details of the card transaction used to pay the bill.

items.bill_payments.card_transaction.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the card payment.

items.bill_payments.card_transaction.card_funding_typestring

Card funding type. Possible values are CREDIT, CASH.

items.bill_payments.card_transaction.card_idstring

Unique identifier of the card used for payment.

items.bill_payments.card_transaction.card_transaction_idstring

Unique identifier of the card transaction.

items.bill_payments.card_transaction.source_amountstring

Transaction amount in the source currency before conversion.

items.bill_payments.card_transaction.source_currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

items.bill_payments.card_transaction.transacted_atstring

Timestamp of the card transaction in ISO8601 format.

items.bill_payments.transferobject

Details of the transfer used to pay the bill.

items.bill_payments.transfer.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the transfer.

items.bill_payments.transfer.multi_billboolean

Whether this transfer payment pays multiple bills.

items.bill_payments.transfer.transfer_datestring

Date when the transfer was made, in ISO8601 format.

items.bill_payments.transfer.transfer_idstring

Unique identifier of the transfer.

items.bill_payments.transfer.source_amountstring

Transfer amount in the source currency before conversion.

items.bill_payments.transfer.source_currencystring

Currency of the original transfer, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

items.billing_amountstring

Total amount of the bill.

items.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.idstring

Unique identifier of the bill.

items.legal_entity_idstring

Unique identifier of the legal entity associated with the bill.

items.line_itemsarray

List of line items on the bill.

items.line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

items.line_items.accounting_field_selections.typestring

Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.

items.line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

items.line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

items.line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

items.line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

items.line_items.idstring

Unique identifier of the line item.

items.line_items.total_amountstring

Total amount for this line item.

items.line_items.descriptionstring

Description of the line item.

items.line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

items.line_items.quantitystring

Quantity of the line item.

items.line_items.tax_amountstring

Tax amount for this line item.

items.line_items.unit_pricestring

Unit price of the line item.

items.statusstring

Bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

items.sync_statusstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

items.tax_statusstring

Tax status indicating whether amounts include or exclude tax. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE, UNSPECIFIED.

items.updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

items.billing_currencystring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

items.descriptionstring

Description of the bill.

items.due_datestring

Date when the bill is due, in ISO8601 format.

items.external_idstring

External identifier for this bill in your system.

items.invoice_numberstring

Invoice number associated with the bill.

items.issued_datestring

Date when the bill was issued, in ISO8601 format.

items.purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

items.sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

items.vendor_idstring

Unique identifier of the vendor associated with the bill.

page_afterstring

A pointer to the end of the page list used in pagination to retrieve the next page of results.

page_beforestring

A pointer to the start of the page list use in pagination to retrieve the previous page of results.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/bills
$curl --request GET \
> --url 'https://api.airwallex.com/api/v1/spend/bills' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "items": [
3 {
4 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
5 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
6 "invoice_number": "INV-0001",
7 "billing_amount": "551.0",
8 "billing_currency": "USD",
9 "status": "AWAITING_PAYMENT",
10 "sync_status": "SYNCED",
11 "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
12 "tax_status": "TAX_EXCLUSIVE",
13 "description": "Office supplies for Q1 2025.",
14 "approvers": [
17 ],
18 "issued_date": "2025-01-10",
19 "due_date": "2025-01-10",
20 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
21 "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
22 "bill_payments": [
23 {
24 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
25 "type": "CARD_TRANSACTION",
26 "amount": "300.00",
27 "currency": "USD",
28 "card_transaction": {
29 "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
30 "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
31 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
32 "card_funding_type": "CREDIT",
33 "source_amount": "300.00",
34 "source_currency": "USD",
35 "transacted_at": "2025-01-02T00:00:00Z"
36 },
37 "created_at": "2025-01-02T00:00:00Z"
38 },
39 {
40 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
41 "type": "TRANSFER",
42 "amount": "251.00",
43 "currency": "USD",
44 "transfer": {
45 "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
46 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
47 "multi_bill": false,
48 "source_amount": "251.00",
49 "source_currency": "USD",
50 "transfer_date": "2025-01-01"
51 },
52 "created_at": "2025-01-01T00:00:00Z"
53 }
54 ],
55 "external_id": "BILL-EXT-001",
56 "attachments": [
57 {
58 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
59 "content_type": "image/jpeg",
60 "file_name": "flight_receipt.jpg",
61 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
62 "created_at": "2025-02-02T00:00:00Z"
63 }
64 ],
65 "line_items": [
66 {
67 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
68 "unit_price": "100.0",
69 "quantity": "5",
70 "description": "Office supplies",
71 "total_amount": "500.0",
72 "tax_amount": "51.0",
73 "accounting_field_selections": [
74 {
75 "type": "OTHER",
76 "name": "Cost Center",
77 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
78 "value": "Office Expense",
79 "value_label": "Office Expense"
80 }
81 ],
82 "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
83 }
84 ],
85 "created_at": "2025-01-01T00:00:00Z",
86 "updated_at": "2025-02-02T00:00:00Z"
87 }
88 ],
89 "page_after": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0=",
90 "page_before": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0="
91}
Was this section helpful?

Get bill

GET /api/v1/spend/bills/{id}

Retrieves the details of an existing bill.

Parameters
idrequiredstring

Unique identifier of the bill.

Response body - 200 OK
approversarray

List of user emails who can approve the bill.

attachmentsarray

List of file attachments associated with the bill.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

bill_paymentsarray

List of payments applied to the bill.

bill_payments.amountstring

Amount of the payment.

bill_payments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

bill_payments.currencystring

Currency of the payment, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.idstring

Unique identifier of the payment.

bill_payments.typestring

Payment method type. Possible values are TRANSFER, CARD_TRANSACTION, EXTERNAL.

bill_payments.card_transactionobject

Details of the card transaction used to pay the bill.

bill_payments.card_transaction.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the card payment.

bill_payments.card_transaction.card_funding_typestring

Card funding type. Possible values are CREDIT, CASH.

bill_payments.card_transaction.card_idstring

Unique identifier of the card used for payment.

bill_payments.card_transaction.card_transaction_idstring

Unique identifier of the card transaction.

bill_payments.card_transaction.source_amountstring

Transaction amount in the source currency before conversion.

bill_payments.card_transaction.source_currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.card_transaction.transacted_atstring

Timestamp of the card transaction in ISO8601 format.

bill_payments.transferobject

Details of the transfer used to pay the bill.

bill_payments.transfer.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the transfer.

bill_payments.transfer.multi_billboolean

Whether this transfer payment pays multiple bills.

bill_payments.transfer.transfer_datestring

Date when the transfer was made, in ISO8601 format.

bill_payments.transfer.transfer_idstring

Unique identifier of the transfer.

bill_payments.transfer.source_amountstring

Transfer amount in the source currency before conversion.

bill_payments.transfer.source_currencystring

Currency of the original transfer, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

billing_amountstring

Total amount of the bill.

billing_currencystring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the bill.

due_datestring

Date when the bill is due, in ISO8601 format.

external_idstring

External identifier for this bill in your system.

idstring

Unique identifier of the bill.

invoice_numberstring

Invoice number associated with the bill.

issued_datestring

Date when the bill was issued, in ISO8601 format.

legal_entity_idstring

Unique identifier of the legal entity associated with the bill.

line_itemsarray

List of line items on the bill.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.total_amountstring

Total amount for this line item.

line_items.descriptionstring

Description of the line item.

line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

line_items.quantitystring

Quantity of the line item.

line_items.tax_amountstring

Tax amount for this line item.

line_items.unit_pricestring

Unit price of the line item.

purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

statusstring

Bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

tax_statusstring

Tax status indicating whether amounts include or exclude tax. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE, UNSPECIFIED.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the bill.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/bills/{id}
$curl --request GET \
> --url 'https://api.airwallex.com/api/v1/spend/bills/bill_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "invoice_number": "INV-0001",
5 "billing_amount": "551.0",
6 "billing_currency": "USD",
7 "status": "AWAITING_PAYMENT",
8 "sync_status": "SYNCED",
9 "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
10 "tax_status": "TAX_EXCLUSIVE",
11 "description": "Office supplies for Q1 2025.",
12 "approvers": [
15 ],
16 "issued_date": "2025-01-10",
17 "due_date": "2025-01-10",
18 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
19 "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
20 "bill_payments": [
21 {
22 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
23 "type": "CARD_TRANSACTION",
24 "amount": "300.00",
25 "currency": "USD",
26 "card_transaction": {
27 "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
28 "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
29 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
30 "card_funding_type": "CREDIT",
31 "source_amount": "300.00",
32 "source_currency": "USD",
33 "transacted_at": "2025-01-02T00:00:00Z"
34 },
35 "created_at": "2025-01-02T00:00:00Z"
36 },
37 {
38 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
39 "type": "TRANSFER",
40 "amount": "251.00",
41 "currency": "USD",
42 "transfer": {
43 "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
44 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
45 "multi_bill": false,
46 "source_amount": "251.00",
47 "source_currency": "USD",
48 "transfer_date": "2025-01-01"
49 },
50 "created_at": "2025-01-01T00:00:00Z"
51 }
52 ],
53 "external_id": "BILL-EXT-001",
54 "attachments": [
55 {
56 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
57 "content_type": "image/jpeg",
58 "file_name": "flight_receipt.jpg",
59 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
60 "created_at": "2025-02-02T00:00:00Z"
61 }
62 ],
63 "line_items": [
64 {
65 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
66 "unit_price": "100.0",
67 "quantity": "5",
68 "description": "Office supplies",
69 "total_amount": "500.0",
70 "tax_amount": "51.0",
71 "accounting_field_selections": [
72 {
73 "type": "OTHER",
74 "name": "Cost Center",
75 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
76 "value": "Office Expense",
77 "value_label": "Office Expense"
78 }
79 ],
80 "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
81 }
82 ],
83 "created_at": "2025-01-01T00:00:00Z",
84 "updated_at": "2025-02-02T00:00:00Z"
85}
Was this section helpful?

Mark bill as paid

POST /api/v1/spend/bills/{id}/mark_as_paid

Marks a bill as paid outside of Airwallex.

Parameters
idrequiredstring

Unique identifier of the bill.

Response body - 200 OK
approversarray

List of user emails who can approve the bill.

attachmentsarray

List of file attachments associated with the bill.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

bill_paymentsarray

List of payments applied to the bill.

bill_payments.amountstring

Amount of the payment.

bill_payments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

bill_payments.currencystring

Currency of the payment, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.idstring

Unique identifier of the payment.

bill_payments.typestring

Payment method type. Possible values are TRANSFER, CARD_TRANSACTION, EXTERNAL.

bill_payments.card_transactionobject

Details of the card transaction used to pay the bill.

bill_payments.card_transaction.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the card payment.

bill_payments.card_transaction.card_funding_typestring

Card funding type. Possible values are CREDIT, CASH.

bill_payments.card_transaction.card_idstring

Unique identifier of the card used for payment.

bill_payments.card_transaction.card_transaction_idstring

Unique identifier of the card transaction.

bill_payments.card_transaction.source_amountstring

Transaction amount in the source currency before conversion.

bill_payments.card_transaction.source_currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.card_transaction.transacted_atstring

Timestamp of the card transaction in ISO8601 format.

bill_payments.transferobject

Details of the transfer used to pay the bill.

bill_payments.transfer.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the transfer.

bill_payments.transfer.multi_billboolean

Whether this transfer payment pays multiple bills.

bill_payments.transfer.transfer_datestring

Date when the transfer was made, in ISO8601 format.

bill_payments.transfer.transfer_idstring

Unique identifier of the transfer.

bill_payments.transfer.source_amountstring

Transfer amount in the source currency before conversion.

bill_payments.transfer.source_currencystring

Currency of the original transfer, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

billing_amountstring

Total amount of the bill.

billing_currencystring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the bill.

due_datestring

Date when the bill is due, in ISO8601 format.

external_idstring

External identifier for this bill in your system.

idstring

Unique identifier of the bill.

invoice_numberstring

Invoice number associated with the bill.

issued_datestring

Date when the bill was issued, in ISO8601 format.

legal_entity_idstring

Unique identifier of the legal entity associated with the bill.

line_itemsarray

List of line items on the bill.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.total_amountstring

Total amount for this line item.

line_items.descriptionstring

Description of the line item.

line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

line_items.quantitystring

Quantity of the line item.

line_items.tax_amountstring

Tax amount for this line item.

line_items.unit_pricestring

Unit price of the line item.

purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

statusstring

Bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

tax_statusstring

Tax status indicating whether amounts include or exclude tax. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE, UNSPECIFIED.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the bill.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/bills/{id}/mark_as_paid
$curl --request POST \
> --url 'https://api.airwallex.com/api/v1/spend/bills/bill_id/mark_as_paid' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "invoice_number": "INV-0001",
5 "billing_amount": "551.0",
6 "billing_currency": "USD",
7 "status": "AWAITING_PAYMENT",
8 "sync_status": "SYNCED",
9 "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
10 "tax_status": "TAX_EXCLUSIVE",
11 "description": "Office supplies for Q1 2025.",
12 "approvers": [
15 ],
16 "issued_date": "2025-01-10",
17 "due_date": "2025-01-10",
18 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
19 "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
20 "bill_payments": [
21 {
22 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
23 "type": "CARD_TRANSACTION",
24 "amount": "300.00",
25 "currency": "USD",
26 "card_transaction": {
27 "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
28 "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
29 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
30 "card_funding_type": "CREDIT",
31 "source_amount": "300.00",
32 "source_currency": "USD",
33 "transacted_at": "2025-01-02T00:00:00Z"
34 },
35 "created_at": "2025-01-02T00:00:00Z"
36 },
37 {
38 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
39 "type": "TRANSFER",
40 "amount": "251.00",
41 "currency": "USD",
42 "transfer": {
43 "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
44 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
45 "multi_bill": false,
46 "source_amount": "251.00",
47 "source_currency": "USD",
48 "transfer_date": "2025-01-01"
49 },
50 "created_at": "2025-01-01T00:00:00Z"
51 }
52 ],
53 "external_id": "BILL-EXT-001",
54 "attachments": [
55 {
56 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
57 "content_type": "image/jpeg",
58 "file_name": "flight_receipt.jpg",
59 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
60 "created_at": "2025-02-02T00:00:00Z"
61 }
62 ],
63 "line_items": [
64 {
65 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
66 "unit_price": "100.0",
67 "quantity": "5",
68 "description": "Office supplies",
69 "total_amount": "500.0",
70 "tax_amount": "51.0",
71 "accounting_field_selections": [
72 {
73 "type": "OTHER",
74 "name": "Cost Center",
75 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
76 "value": "Office Expense",
77 "value_label": "Office Expense"
78 }
79 ],
80 "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
81 }
82 ],
83 "created_at": "2025-01-01T00:00:00Z",
84 "updated_at": "2025-02-02T00:00:00Z"
85}
Was this section helpful?

Update bill sync status

POST /api/v1/spend/bills/{id}/sync

Updates the sync status of a bill.

Parameters
idrequiredstring

Unique identifier of the bill.

Request body
sync_statusrequiredstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

sync_error_messagestring

Error message for sync failures. Only applicable when sync_status is SYNC_FAILED.

Response body - 200 OK
approversarray

List of user emails who can approve the bill.

attachmentsarray

List of file attachments associated with the bill.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

bill_paymentsarray

List of payments applied to the bill.

bill_payments.amountstring

Amount of the payment.

bill_payments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

bill_payments.currencystring

Currency of the payment, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.idstring

Unique identifier of the payment.

bill_payments.typestring

Payment method type. Possible values are TRANSFER, CARD_TRANSACTION, EXTERNAL.

bill_payments.card_transactionobject

Details of the card transaction used to pay the bill.

bill_payments.card_transaction.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the card payment.

bill_payments.card_transaction.card_funding_typestring

Card funding type. Possible values are CREDIT, CASH.

bill_payments.card_transaction.card_idstring

Unique identifier of the card used for payment.

bill_payments.card_transaction.card_transaction_idstring

Unique identifier of the card transaction.

bill_payments.card_transaction.source_amountstring

Transaction amount in the source currency before conversion.

bill_payments.card_transaction.source_currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.card_transaction.transacted_atstring

Timestamp of the card transaction in ISO8601 format.

bill_payments.transferobject

Details of the transfer used to pay the bill.

bill_payments.transfer.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the transfer.

bill_payments.transfer.multi_billboolean

Whether this transfer payment pays multiple bills.

bill_payments.transfer.transfer_datestring

Date when the transfer was made, in ISO8601 format.

bill_payments.transfer.transfer_idstring

Unique identifier of the transfer.

bill_payments.transfer.source_amountstring

Transfer amount in the source currency before conversion.

bill_payments.transfer.source_currencystring

Currency of the original transfer, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

billing_amountstring

Total amount of the bill.

billing_currencystring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the bill.

due_datestring

Date when the bill is due, in ISO8601 format.

external_idstring

External identifier for this bill in your system.

idstring

Unique identifier of the bill.

invoice_numberstring

Invoice number associated with the bill.

issued_datestring

Date when the bill was issued, in ISO8601 format.

legal_entity_idstring

Unique identifier of the legal entity associated with the bill.

line_itemsarray

List of line items on the bill.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.total_amountstring

Total amount for this line item.

line_items.descriptionstring

Description of the line item.

line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

line_items.quantitystring

Quantity of the line item.

line_items.tax_amountstring

Tax amount for this line item.

line_items.unit_pricestring

Unit price of the line item.

purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

statusstring

Bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

tax_statusstring

Tax status indicating whether amounts include or exclude tax. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE, UNSPECIFIED.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the bill.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/bills/{id}/sync
$curl --request POST \
> --url 'https://api.airwallex.com/api/v1/spend/bills/bill_id/sync' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "sync_status": "SYNC_FAILED",
> "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency."
>}'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "invoice_number": "INV-0001",
5 "billing_amount": "551.0",
6 "billing_currency": "USD",
7 "status": "AWAITING_PAYMENT",
8 "sync_status": "SYNCED",
9 "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
10 "tax_status": "TAX_EXCLUSIVE",
11 "description": "Office supplies for Q1 2025.",
12 "approvers": [
15 ],
16 "issued_date": "2025-01-10",
17 "due_date": "2025-01-10",
18 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
19 "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
20 "bill_payments": [
21 {
22 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
23 "type": "CARD_TRANSACTION",
24 "amount": "300.00",
25 "currency": "USD",
26 "card_transaction": {
27 "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
28 "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
29 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
30 "card_funding_type": "CREDIT",
31 "source_amount": "300.00",
32 "source_currency": "USD",
33 "transacted_at": "2025-01-02T00:00:00Z"
34 },
35 "created_at": "2025-01-02T00:00:00Z"
36 },
37 {
38 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
39 "type": "TRANSFER",
40 "amount": "251.00",
41 "currency": "USD",
42 "transfer": {
43 "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
44 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
45 "multi_bill": false,
46 "source_amount": "251.00",
47 "source_currency": "USD",
48 "transfer_date": "2025-01-01"
49 },
50 "created_at": "2025-01-01T00:00:00Z"
51 }
52 ],
53 "external_id": "BILL-EXT-001",
54 "attachments": [
55 {
56 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
57 "content_type": "image/jpeg",
58 "file_name": "flight_receipt.jpg",
59 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
60 "created_at": "2025-02-02T00:00:00Z"
61 }
62 ],
63 "line_items": [
64 {
65 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
66 "unit_price": "100.0",
67 "quantity": "5",
68 "description": "Office supplies",
69 "total_amount": "500.0",
70 "tax_amount": "51.0",
71 "accounting_field_selections": [
72 {
73 "type": "OTHER",
74 "name": "Cost Center",
75 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
76 "value": "Office Expense",
77 "value_label": "Office Expense"
78 }
79 ],
80 "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
81 }
82 ],
83 "created_at": "2025-01-01T00:00:00Z",
84 "updated_at": "2025-02-02T00:00:00Z"
85}
Was this section helpful?

Create bill

POST /api/v1/spend/bills/create

Creates a new bill.

Request body
billing_currencyrequiredstring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

due_daterequiredstring

Date when the bill is due, in ISO8601 format.

external_idrequiredstring

External identifier for this bill in your system.

invoice_numberrequiredstring

Invoice number associated with the bill.

issued_daterequiredstring

Date when the bill was issued, in ISO8601 format.

legal_entity_idrequiredstring

Unique identifier of the legal entity associated with the bill.

line_itemsrequiredarray

List of line items on the bill.

line_items.quantityrequiredstring

Quantity of the line item.

line_items.unit_pricerequiredstring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.field_idrequiredstring

ID of the accounting field. If AIRWALLEX_ID is selected as identifier_type this refers to the unique identifier of the accounting field in the Airwallex system. If EXTERNAL_ID is selected as identifier_type, this refers to the unique identifier of the accounting field in the ERP system. Use Chart of accounts for chart of account and Tax rates for tax rate. For remaining custom accounting data connections, use the category name to specify the field.

line_items.accounting_field_selections.field_value_idrequiredstring

ID of the accounting field value. If AIRWALLEX_ID is selected as identifier_type this refers to the unique identifier of the accounting field value in the Airwallex system. If EXTERNAL_ID is selected as identifier_type, this refers to the unique identifier of the accounting field value in the ERP system.

line_items.accounting_field_selections.identifier_typerequiredstring

Type of identifier used for accounting field references. Choose AIRWALLEX_ID to reference internal Airwallex UUIDs, or EXTERNAL_ID to reference identifiers from your integrated ERP system.

line_items.descriptionstring

Description of the line item.

line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

request_idrequiredstring

Unique identifier for this request to ensure idempotency. To prevent accidental duplication, clients should generate a random UUID.

sync_statusrequiredstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

tax_statusrequiredstring

Tax status for bill creation. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE.

vendor_idrequiredstring

Unique identifier of the vendor associated with the bill.

descriptionstring

Description of the bill.

purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

Response body - 201 Created
approversarray

List of user emails who can approve the bill.

attachmentsarray

List of file attachments associated with the bill.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

bill_paymentsarray

List of payments applied to the bill.

bill_payments.amountstring

Amount of the payment.

bill_payments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

bill_payments.currencystring

Currency of the payment, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.idstring

Unique identifier of the payment.

bill_payments.typestring

Payment method type. Possible values are TRANSFER, CARD_TRANSACTION, EXTERNAL.

bill_payments.card_transactionobject

Details of the card transaction used to pay the bill.

bill_payments.card_transaction.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the card payment.

bill_payments.card_transaction.card_funding_typestring

Card funding type. Possible values are CREDIT, CASH.

bill_payments.card_transaction.card_idstring

Unique identifier of the card used for payment.

bill_payments.card_transaction.card_transaction_idstring

Unique identifier of the card transaction.

bill_payments.card_transaction.source_amountstring

Transaction amount in the source currency before conversion.

bill_payments.card_transaction.source_currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

bill_payments.card_transaction.transacted_atstring

Timestamp of the card transaction in ISO8601 format.

bill_payments.transferobject

Details of the transfer used to pay the bill.

bill_payments.transfer.account_idstring

Unique identifier of the Airwallex account associated with the wallet that funded the transfer.

bill_payments.transfer.multi_billboolean

Whether this transfer payment pays multiple bills.

bill_payments.transfer.transfer_datestring

Date when the transfer was made, in ISO8601 format.

bill_payments.transfer.transfer_idstring

Unique identifier of the transfer.

bill_payments.transfer.source_amountstring

Transfer amount in the source currency before conversion.

bill_payments.transfer.source_currencystring

Currency of the original transfer, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

billing_amountstring

Total amount of the bill.

billing_currencystring

Currency of the bill, as an ISO 4217 currency code.

UNDEFINED, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RUR, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the bill.

due_datestring

Date when the bill is due, in ISO8601 format.

external_idstring

External identifier for this bill in your system.

idstring

Unique identifier of the bill.

invoice_numberstring

Invoice number associated with the bill.

issued_datestring

Date when the bill was issued, in ISO8601 format.

legal_entity_idstring

Unique identifier of the legal entity associated with the bill.

line_itemsarray

List of line items on the bill.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.total_amountstring

Total amount for this line item.

line_items.descriptionstring

Description of the line item.

line_items.purchase_order_line_item_idstring

Unique identifier of the purchase order line item associated with this bill line item.

line_items.quantitystring

Quantity of the line item.

line_items.tax_amountstring

Tax amount for this line item.

line_items.unit_pricestring

Unit price of the line item.

purchase_order_idstring

Unique identifier of the purchase order associated with the bill.

statusstring

Bill status. Possible values are DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, PAYMENT_IN_PROGRESS, PAID, REJECTED, SCHEDULED.

sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.

tax_statusstring

Tax status indicating whether amounts include or exclude tax. Possible values are TAX_EXCLUSIVE, TAX_INCLUSIVE, UNSPECIFIED.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the bill.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/bills/create
$curl --request POST \
> --url 'https://api.airwallex.com/api/v1/spend/bills/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "request_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
> "external_id": "BILL-EXT-001",
> "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
> "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
> "invoice_number": "INV-0001",
> "issued_date": "2025-01-10",
> "due_date": "2025-01-10",
> "billing_currency": "USD",
> "tax_status": "TAX_EXCLUSIVE",
> "sync_status": "SYNCED",
> "line_items": [
> {
> "description": "Office supplies",
> "quantity": "10",
> "unit_price": "500.0",
> "accounting_field_selections": [
> {
> "identifier_type": "EXTERNAL_ID",
> "field_id": "Chart of accounts",
> "field_value_id": "EXT-SALES-003"
> }
> ],
> "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
> }
> ],
> "description": "Office supplies for Q1 2025.",
> "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e"
>}'
Response (201 Created)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "invoice_number": "INV-0001",
5 "billing_amount": "551.0",
6 "billing_currency": "USD",
7 "status": "AWAITING_PAYMENT",
8 "sync_status": "SYNCED",
9 "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
10 "tax_status": "TAX_EXCLUSIVE",
11 "description": "Office supplies for Q1 2025.",
12 "approvers": [
15 ],
16 "issued_date": "2025-01-10",
17 "due_date": "2025-01-10",
18 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
19 "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
20 "bill_payments": [
21 {
22 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
23 "type": "CARD_TRANSACTION",
24 "amount": "300.00",
25 "currency": "USD",
26 "card_transaction": {
27 "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
28 "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
29 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
30 "card_funding_type": "CREDIT",
31 "source_amount": "300.00",
32 "source_currency": "USD",
33 "transacted_at": "2025-01-02T00:00:00Z"
34 },
35 "created_at": "2025-01-02T00:00:00Z"
36 },
37 {
38 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
39 "type": "TRANSFER",
40 "amount": "251.00",
41 "currency": "USD",
42 "transfer": {
43 "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
44 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
45 "multi_bill": false,
46 "source_amount": "251.00",
47 "source_currency": "USD",
48 "transfer_date": "2025-01-01"
49 },
50 "created_at": "2025-01-01T00:00:00Z"
51 }
52 ],
53 "external_id": "BILL-EXT-001",
54 "attachments": [
55 {
56 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
57 "content_type": "image/jpeg",
58 "file_name": "flight_receipt.jpg",
59 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
60 "created_at": "2025-02-02T00:00:00Z"
61 }
62 ],
63 "line_items": [
64 {
65 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
66 "unit_price": "100.0",
67 "quantity": "5",
68 "description": "Office supplies",
69 "total_amount": "500.0",
70 "tax_amount": "51.0",
71 "accounting_field_selections": [
72 {
73 "type": "OTHER",
74 "name": "Cost Center",
75 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
76 "value": "Office Expense",
77 "value_label": "Office Expense"
78 }
79 ],
80 "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
81 }
82 ],
83 "created_at": "2025-01-01T00:00:00Z",
84 "updated_at": "2025-02-02T00:00:00Z"
85}
Was this section helpful?