Skip to main content
POST

Authorizations

Authorization
string
header
required

Merchant API key bearer token.

Headers

Idempotency-Key
string
required

Client-supplied unique key for safe retries of this mutating request. Scoped per merchant or resource as documented on each endpoint.

Example:

"idem-01"

Path Parameters

id
string
required

Invoice TypeID (inv_...) to send.

Example:

"inv_01hxy8m1nqk9g3x3y3p0azq2va"

Body

application/json

Send payload with merchant scope and optional recipient email override. Supply idempotency via the Idempotency-Key header.

merchantId
string
required

Merchant TypeID (mer_...) used for authorization scope.

recipientEmail
string<email>

Optional override recipient. When omitted, PayGood sends to the customer's email on file.

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$

Response

Invoice email sent successfully. Response reflects the latest invoice state (issued if previously draft, unchanged when already issued), plus the checkout URL the customer can use to view and pay the invoice.

invoiceId
string
required
invoiceNumber
string
required
Minimum string length: 1
invoiceUrlSlug
string
required

Secret pay-link token. Anyone holding this value can view and pay the invoice anonymously, so treat it like a credential: safe to send to the customer, never safe to log or expose publicly. Unguessable and unrelated to invoiceId, so it can be rotated without changing the invoice.

Minimum string length: 1
idempotencyKey
string
required
Minimum string length: 1
merchantId
string
required
customerId
string
required
currentRevisionNumber
integer
required
Required range: 0 < x <= 9007199254740991
status
enum<string>
required
Available options:
draft,
issued,
partially_paid,
paid,
void
currency
string
required

Supported currency code (USD, CAD)

Required string length: 3
lineItems
object[]
required
productTotal
object
required
total
object
required
amountPaid
object
required

Sum of applied payment allocations, both processed and out-of-band.

amountRemaining
object
required

Computed as total minus amountPaid. Zero when the invoice is fully paid.

acceptedPaymentMethods
enum<string>[]
required

Which payment method types checkout may offer for this invoice.

Available options:
card,
bank_account
additionalNotificationEmails
string<email>[]
required
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
checkoutUrl
string<uri>
required

Customer-facing checkout URL for this invoice, built from CHECKOUT_URL and the invoice slug.

dueDate
string<date-time>
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
paidAt
string<date-time>
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
notes
string
metadata
object