Skip to main content
POST
Cancel payment receipt

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Path Parameters

id
string
required

Resource identifier.

Body

application/json
motive
enum<string>
required
Available options:
01,
02

Response

Cancelled payment receipt.

A fiscal payment receipt (e.g. Mexican REP / "complemento de pago"). It groups one or more payment sources that completed payment of an invoice.

sources
string[]
required

IDs of payment sources covered by this receipt. All sources must belong to invoices for the same customer and document type, and cannot already have a payment receipt.

id
integer
read-only
document
enum<string> | null
read-only

Fiscal document type (set automatically by the biller).

Available options:
MX22
number
integer
read-only
payment_date
string<date> | null

Date the payment was received (SAT FechaPago). Defaults to the payment date of the first source. Cannot be in the future nor before the invoice date. The issue date of the receipt is always the stamping time.

date
string<date> | null
deprecated

Deprecated, use payment_date. During the transition period it keeps its current meaning (issue date, which the SAT only accepts up to 72 hours in the past). From the effective date announced in the payment receipts guide it is read as the payment date when payment_date is not sent.

custom_change
number | null

Exchange rate of the payment currency to MXN (SAT TipoCambioP) when the payment is in a foreign currency and its sources do not carry offline_payment.exchange_rate. If omitted, Piriod uses the rate registered for the payment date.

Required range: x >= 1
replaces
string | null

ID of a stamped payment receipt this one substitutes (SAT relation 04). It must have the same sources and not be replaced yet. Cancel the replaced receipt afterwards with motive 01.

metadata
object
tax_settings
object

Country-specific tax-agency settings (validated at create/update).

status
enum<string>
read-only
Available options:
draft,
finalized,
cancelled
biller_status
string
read-only
tax_agency
object
read-only
local_file
string<uri> | null
read-only
created
string<date-time>
read-only
updated
string<date-time>
read-only