Skip to content

withholding.authorized

POST

The SRI authorized the document.

webhook-id
required
string format: uuid

The event id (UUIDv7), the same on every attempt and replay: deduplicate on it.

webhook-timestamp
required
string
/^\d+$/

Unix time (seconds) of this attempt. Refuse values more than 5 minutes from your clock.

webhook-signature
required
string

Space-separated v1,<base64> signatures: HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<body> with the base64-decoded part of the whsec_ secret. Accept the request if any of them matches (there is one per valid secret during a rotation).

Media typeapplication/json
One of:
Document event

An event about a document (its tax outcome, RIDE or email): data is the Document as the API returned it when the event happened (texts in English).

object
id
required
string format: uuid

Example

01a14082-3c1d-7f0e-8b2a-6d5e4f3a2b10
type
required
string
Allowed values: invoice.authorized invoice.rejected purchase_settlement.authorized purchase_settlement.rejected credit_note.authorized credit_note.rejected debit_note.authorized debit_note.rejected waybill.authorized waybill.rejected withholding.authorized withholding.rejected document.ride.generated document.ride.failed document.email.sent document.email.delivered document.email.bounced document.email.complained document.email.failed

Example

invoice.authorized
environment
required

Mode of the resource.

string
Allowed values: test live
createdAt
required
string format: date-time
data
required

An SRI document of any type.

object
id
required
string format: uuid

Example

01a13fdf-9620-77a7-a18e-0b13542f5fed
type
required
string
Allowed values: invoice purchase_settlement credit_note debit_note waybill withholding

Example

invoice
environment
required

Mode of the API key that issued it: test (SRI pruebas) or live.

string
Allowed values: test live

Example

test
status
required

Tax status: processing (being signed and sent), pending_sri (waiting for the SRI), authorized, rejected, failed or voided.

string
Allowed values: processing pending_sri authorized rejected failed voided

Example

processing
issuerId
required
string format: uuid
establishment
required
string

Example

001
emissionPoint
required
string

Example

001
sequential
required
number

Example

123
number
required

Establishment-emission point-sequential.

string

Example

001-001-000000123
accessKey
required

The 49-digit access key, also the authorization number.

string

Example

1510202601179000000000110010010000001234152637411
issueDate
required
string format: date

Example

2026-10-15
xmlVersion
required

Version of the SRI XML.

string

Example

2.1.0
counterparty
required
Any of:

The buyer, supplier, withheld subject or carrier.

object
id
required
string

Example

1790000000001
name
required
string

Example

Supermercados La Pradera S.A.
totals
required
Any of:

Totals computed by Flashpi. Invoices have every field but withheld; purchase settlements and credit notes have no tip; debit notes have no discount nor tip; withholding receipts only have withheld.

object
subtotal

Sum of the line subtotals.

string

Example

60.31
discount

Sum of the line discounts.

string

Example

0.75
taxes
Array<object>

A tax total, grouped per tax and rate.

object
type
required
string
Allowed values: vat ice

Example

vat
rate
required

VAT: the rate (15, 0, exempt, …). ICE: the percentage.

string

Example

15
code

ICE: the TABLA 18 code.

string

Example

3031
taxableBase
required

Taxable base.

string

Example

57.50
amount
required

Tax amount.

string

Example

8.63
tip

Tip.

string

Example

0.00
total

Total (credited amount of a credit note, total of a debit note).

string

Example

68.94
withheld

Total withheld.

string

Example

62.50
authorization
required

The SRI authorization.

object
number
required

Authorization number (the access key), once authorized.

string | null

Example

null
authorizedAt
required
string | null format: date-time

Example

null
ride
required

The RIDE (printed PDF), generated once the document is authorized.

object
status
required
string
Allowed values: pending generated failed

Example

pending
template
required
string | null
Allowed values: modern classic minimal

Example

null
generatedAt
required
string | null format: date-time

Example

null
email
required

Email delivery, separate from the tax status: sent only once the document is authorized, when it was requested and there is a recipient.

object
requested
required

Whether the email was requested.

boolean

Example

true
status
required

not_requested (opted out), skipped (no recipient), queued (sent once authorized), then sent, delivered, bounced, complained or failed.

string
Allowed values: not_requested skipped queued sent delivered bounced complained failed

Example

queued
deliveries
required
Array<object>

One email to one recipient.

object
id
required
string format: uuid
recipient
required
string

Example

compras@example.com
status
required
string
Allowed values: queued sent delivered bounced complained failed

Example

delivered
sentAt
required
string | null format: date-time
lastEventAt
required
string | null format: date-time
error
required

Why the email failed or bounced, as a code: for example rejected, timeout, invalid_address, bounce_permanent, bounce_suppressed (the address is on the suppression list of Flashpi’s email provider after an earlier bounce or complaint), complaint, account_email_limit_reached (the account’s emails of the day were used up; nothing was sent), platform_email_limit_reached (Flashpi’s emails of the day across all accounts were used up; nothing was sent), email_sending_paused (the account’s emails of the mode are paused; nothing was sent), platform_email_sending_paused (Flashpi paused the emails of its email provider for every account after too many bounces or complaints; nothing was sent), test_recipient_not_allowed (a test document whose recipient is not a verified member of the account’s team; nothing was sent: download the RIDE and the XML to send them) or invalid_domain (the recipient’s domain does not exist or receives no mail: no MX, A or AAAA record, or a null MX; nothing was sent).

string | null

Example

null
warnings
required

Warnings about the recipient’s address, computed when the document is read: empty when nothing looks wrong.

Array<object>

Something about the email that looks wrong. A warning never stops or changes the email.

object
code
required

recipient_domain_typo: the recipient’s domain looks like a typo of a common mail domain (for example gmial.com for gmail.com). The email is still sent to the address as given; nothing changes it.

string
Allowed values: recipient_domain_typo

Example

recipient_domain_typo
message
required

Follows Accept-Language (English or Spanish).

string

Example

The recipient's email address may be mistyped: did you mean compras@gmail.com?
suggestedRecipient
required

The address with the suggested domain.

string

Example

compras@gmail.com
sriMessages
required

Messages of the last SRI answer, mapped to Flashpi codes (the reasons of a rejection, or warnings of an authorization). Texts follow Accept-Language (English or Spanish).

Array<object>

A message of the SRI, mapped by Flashpi.

object
code
required

Flashpi error code.

string

Example

calculation_mismatch
message
required
string

Example

The SRI found differences in the calculations.
severity
required
string
Allowed values: error warning

Example

error
failure
required
Any of:

Why a failed document could not reach an SRI answer.

object
code
required
string
Allowed values: certificate_required certificate_expired certificate_not_yet_valid certificate_blocked certificate_revoked certificate_unusable document_too_large document_invalid signing_failed sri_unavailable sri_authorization_timeout sri_request_refused sri_environment_mismatch

Example

certificate_required
message
required
string

Example

The issuer has no accepted signing certificate for this mode. Upload its .p12 certificate and issue the document again.
voidedAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Acknowledged. Anything else is retried.