Skip to main content
POST

Authorizations

Authorization
string
header
required

Merchant API key bearer token. Legacy wire prefixes api_key_ and api_ are also accepted.

Path Parameters

id
string
required

Invoice TypeID (inv_...) to send.

Example:

"inv_01hxy8m1nqk9g3x3y3p0azq2va"

Body

application/json

Send payload with idempotency key, merchant scope, and optional recipient email override.

idempotencyKey
string
required

Idempotency key for safe retries of the send operation per invoice.

Minimum string length: 1
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).

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.

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))$
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