MX Invoice

Create, send, and manage invoices with click-to-pay in PCE.

PCE Invoice lets you create professional invoices and collect payments fast through a secure pay link. Choose a customer, add line items, enable card and/or ACH, and send. Customers receive an email (and optionally SMS) with a link to view and pay. A receipt is issued automatically on successful payment.

PCE Invoice

Prerequisites & limitations

  • Prerequisites: API credentials, a live or sandbox merchant (merchantId), and at least one configured payment method (card and/or ACH).
  • Limitations: Taxes are applied at line level via taxes or taxCategory. Invoice-level isTaxExempt overrides taxes where permitted. Discount stacking depends on isExclusive. ACH availability is region/gateway dependent.

Create invoice

POST https://sandbox.api.mxmerchant.com/checkout/v3/invoice?echo=true

Use this endpoint to create a new invoice with optional click-to-pay.

Query parameter

NameTypeRequiredExampleDescription
echobooleanNotrueReturns the created invoice object in the response.

Top-level body fields

FieldType / EnumRequiredNotes
invoiceDatestring (ISO 8601)NoIf omitted, server time is used.
merchantIdintegerYesMerchant creating the invoice.
statusenum: UnpaidPaidVoidNoDefaults to Unpaid on create.
isClick2PayEnabledbooleanNoEnables pay link on the invoice.
allowCreditCardbooleanNoAllow card payments.
allowACHbooleanNoAllow ACH payments.
termsenum (e.g., OnReceipt)NoUsed to calculate dueDate.
dueDatestring (ISO 8601)NoDerived from terms if omitted.
memostringNoFree-form note shown on the invoice.
isTaxExemptbooleanNoInvoice-level tax exemption.
purchasesarray<PurchaseItem>YesAt least one line item required.
shippingAddressAddressNoShipping address snapshot.
billingAddressAddressNoBilling address snapshot.
customerCustomerYesCustomer being invoiced.

PurchaseItem (line item)

FieldType / EnumRequiredNotes
productNamestringYesItem title shown on the invoice.
descriptionstringNoAdditional detail.
pricenumberYesUnit price.
quantityintegerYesDefaults to 1 if omitted.
discountnumberNoAmount discount at line level.
discounts[]array<Discount>NoStructured discounts applied to the line.
taxes[]array<Tax>NoExplicit tax entries.
taxCategoryTaxCategoryNoCategory that determines applicable taxes.
totalAmountstring/numberNoCalculated (read-only on create).

Discount

FieldType / EnumNotes
discountTypeenum: ItemInvoiceScope of discount.
discountRateTypeenum: AmountPercentCalculation method.
ratestring/numberAmount or percent (e.g., 20).
codestringOptional promo code.
isExclusivebooleanIf true, cannot stack with other discounts.

Tax

FieldTypeNotes
idintegerTax ID.
namestringDisplay name.
ratestringDecimal (e.g., 0.07 for 7%).
taxCodestringMatches tax category code.

TaxCategory

FieldTypeNotes
idintegerTax category ID.
codestringCategory code (e.g., Georgia).
displaystringHuman-readable label (e.g., 7.000 % - Georgia).

Address

FieldTypeNotes
address1stringStreet line 1.
citystringCity.
statestringState/Province.
zipstringPostal/ZIP code.
countrystringISO country code (e.g., US).

Customer

FieldTypeNotes
idintegerCustomer ID.
namestringFull name.
emailstringBilling email for invoice delivery.
mobilestringOptional; may be used for SMS notices.
customerNumberstringMerchant’s external customer number.
isTaxExemptbooleanCustomer-level tax exemption.

Response (201 Created)

Common response fields after successful create:

FieldType / ExampleDescription
id239998Internal invoice identifier.
invoiceNumber1047Human-readable invoice number.
receiptNumberPTFOO01174PVReceipt reference.
accessCodeFVF745Code embedded in the pay link.
statusUnpaidCurrent invoice status.
termsOnReceiptPayment terms.
dueDate2020-10-14T04:00:00ZPayment due date.
invoiceDate2020-10-14T04:00:00ZInvoice date.
allowCreditCardtrueCard payments allowed.
allowACHfalseACH payments allowed.
barCodebase64 stringEncoded barcode image data.
purchases[]arrayNormalized line items with taxes/discounts applied.
customerobjectCustomer summary (id, name, email, mobile).
billingAddressobjectBilling address snapshot.
shippingAddressobjectShipping address snapshot.
totalAmountstring/numberInvoice total.
subTotalAmountstring/numberSubtotal before tax/discounts.
taxAmountstring/numberTotal tax applied.
discountAmountstring/numberTotal discounts applied.
balancestring/numberAmount due (total – paid).
paidAmountstring/numberAmount paid to date.
sourceTypee.g., MXMOriginating source.

Tip: Add ?echo=true to return the full invoice object in the create response.


Send invoice receipt

Send a copy of the invoice receipt via email and/or SMS.

POST https://sandbox.api.mxmerchant.com/checkout/v3/invoicereceipt?id={{invoiceId}}&contact={{email}}%2C{{phoneNumber}}

Parameters

NameLocationRequiredExampleDescription
idqueryYes239998Invoice ID to send a receipt for.
contactqueryYes[email protected],15551234567Comma-separated list of email(s) and/or E.164 phone(s).

Get tax & tax category information

If you don’t know the tax or tax category IDs, fetch them first.

GET https://api.mxmerchant.com/checkout/v3/tax?merchantId={{merchantId}}

Request parameter

NameTypeRequiredDescription
merchantIdintegerYesMerchant ID to scope the tax catalog.

Response (200 OK)

PathTypeDescription
records[].idintegerTax ID used on items.
records[].namestringTax name.
records[].ratestringDecimal tax rate (e.g., 0.07).
records[].taxCategories[].idintegerTax Category ID (e.g., 2584).
records[].taxCategories[].namestringCategory name (e.g., Georgia).
records[].taxCategories[].codestringCategory code.
records[].taxCategories[].isPrimarybooleanIndicates primary category for the tax.

Apply taxes effectively • Prefer setting a taxCategory on each line item. • Use explicit taxes[] to target a specific tax ID. • Set isTaxExempt at the invoice or customer level where allowed.


See also

  • Activation video — PCE Invoice

© 2025 Priority Technology Holdings LLC. All rights reserved.