With your consent, we measure how people use our site and which campaigns bring them here, and identify visiting companies so our team can follow up. Privacy Policy
Tools and providers
Plausible · Analytics, only after Accept
Counts visits and which campaigns bring them.
Stores nothing on your device. The identifier it uses to count unique visitors changes every 24 hours.
Leadfeeder · Marketing, only after Accept
Identifies the company you may be browsing from, so our sales team can follow up.
Leadfeeder data is kept for 12 months in our Leadfeeder account. What it keeps on your device is listed below.
_lfa, _lfa_expiry · Cookie and local storage
A visitor ID. The cookie is kept for 1 year. The local storage copy is not used after 1 year and stays until you clear it. Withdrawing removes both.
_lfa_consent · Cookie and local storage
Records that you accepted. The cookie is kept for 1 year, the local storage copy until you clear it. Withdrawing removes both.
ldfdr_opt_out, ldfdr_opt_out_expiry · Cookie and local storage
Set when you withdraw after accepting, or your Accept runs out on an open page, so Leadfeeder stays off. The cookie is kept for 10 years, or until you close your browser if Leadfeeder never loaded. The local storage copy stays until you clear it. Accepting again removes both.
_lfa_test_cookie_stored · Cookie
Checks that your browser accepts cookies. Deleted straight away.
Outpost · Always, to remember your choice
Keeps your choice, so we do not ask on every page.
outpost-consent · Local storage
Your choice, when you made it, the version of this notice and a random ID. We do not store the ID on our side. Your choice applies for 365 days, then we ask again. The entry stays on your device until you clear it or make a new choice.
outpost-consent-declined · Cookie
Records when you rejected, only if your browser cannot save your choice. Kept for 365 days.
Every request, response, and error shape - grouped by resource. Module pages under Modules explain when to use each surface and link here for schemas - this page is the exhaustive reference. Every request uses the same Bearer authentication described below.
Authentication
Outpost uses OAuth2 client_credentials for server-to-server calls. Your backend exchanges a client_id and api_token for an access_token, then sends it as a Bearer token on every API request.
Create and manage your API credentials in the Outpost merchant portal. Your credentials are scoped to your own merchant account.
How-to and operational notes live on the Authentication page - the shapes below are the reference copy.
Flow
Request an access_token with your client_id and api_token
Read access_token and expires_in from the response
Cache the token server-side with TTL expires_in - 300s
Refresh on expiry or on a 401, then retry the request once
Send Authorization: Bearer <access_token> on every API call
Get access token
POST/oauth2/token
Host: https://access.outpostanywhere.com
Do not send token requests to the API host (https://api.outpostanywhere.com).
Send your api_token as the OAuth client_secret form field - that is the wire name for this grant.
Run from your server. Never expose your api_token in the browser.
Resource
Tax
Calculate tax, commit transactions, retrieve and refund them, and keep your product catalogue in sync.
Create Tax Calculation
POST/api/tax/calculations
Creates a tax calculation for a given set of line items and customer information. The calculation determines applicable tax rates based on the customer's location and can be used to create a transaction after the successful payment.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Content-Type
-
Yes
application/json
Request Body Parameters
One endpoint, two product cases: the request shape below covers both digital goods and physical goods with cross-border import duty. Declare the case per line with productType. Worked examples for each case follow the parameter table.
Parameter
Type
Required
Description
currency
string
Yes
ISO 4217 currency code (e.g., EUR, USD, GBP, BRL). Brazil B2C NFS-e requires BRL.
taxBehavior
string enum
No
Allowed values: EXCLUSIVE, INCLUSIVE. Defaults to EXCLUSIVE. With INCLUSIVE, unitPrice is the gross amount and tax is extracted from it.
customer
object
Yes
Customer information object
customer.merchantCustomerReference
string
No
Your internal customer identifier
customer.firstName
string
Customer's first name.
customer.lastName
string
Customer's last name.
customer.legalName
string
A company’s legal name as one value.
customer.email
string
No
Customer's email address
customer.taxIdentifiers
array
Customer tax identifiers, discriminated on type.
customer.taxIdentifiers[].type
string enum
Conditional
Identifier type: BR_CPF, BR_CNPJ, EU_VAT, GB_VAT, or US_EIN. The jurisdiction is part of the type - there is no country field. Unknown types are rejected. Brazil requires exactly one BR_CPF or BR_CNPJ; other types may accompany it.
customer.taxIdentifiers[].code
string
Conditional
Identifier value. Format/check-digit validated for BR_CPF and BR_CNPJ (not against Receita Federal registration). VIES format with a two-letter country prefix for EU_VAT. GB_VAT and US_EIN are informational and recorded as provided. Formatted or bare codes accepted.
Customer's shipping address. The destination drives US sales-tax sourcing.
customer.shippingAddress.line1
string
Primary address line.
customer.shippingAddress.line2
string
No
Secondary address line
customer.shippingAddress.city
string
City name.
customer.shippingAddress.state
string
State/province code.
customer.shippingAddress.postalCode
string
Postal/ZIP code.
customer.shippingAddress.country
string
Conditional
ISO 3166-1 alpha-2 country code. Required whenever the shipping address is present.
lineItems
array
Yes
Array of line items (minimum 1)
lineItems[].merchantLineItemReference
string
Yes
Your internal line item identifier
lineItems[].productCode
string
Yes
Product/service code for tax classification
lineItems[].title
string
Product title - the primary classification text.
lineItems[].description
string
Detailed product description. Improves HS code prediction together with title, and is printed on fiscal documents (falls back to title when absent).
lineItems[].unitPrice
decimal
Yes
Price per unit (must be ≥ 0)
lineItems[].quantity
integer
No
Quantity (default: 1, must be > 0)
lineItems[].discountAmount
decimal
No
Discount amount per unit. For quantity 3 and discountAmount 2.00, the total discount is 6.00; applied before tax calculation.
lineItems[].productType
string enum
Recommended
Allowed values: PHYSICAL, DIGITAL, SERVICES. Pass it explicitly on every line. Lines without productType are treated as DIGITAL for backward compatibility - do not rely on that. Drives tax engine selection: physical goods are priced with import duty on the cross-border path. SERVICES is a fee or service charge on a goods order and requires ancillaryType.
lineItems[].ancillaryType
string enum
What kind of fee a SERVICES line is. COMMISSION - your commission or service fee on the purchase. SHIPPING_COST - the delivery charge. HANDLING - handling or processing of the order. PACKAGING - packing materials. OTHER - any other fee. Rejected on PHYSICAL and DIGITAL lines.
lineItems[].countryOfOrigin
string
ISO 3166-1 alpha-2 country of manufacture. Requires productType PHYSICAL.
lineItems[].hsCode
string
No
Destination-qualified full HS code to classify the line with: 6-14 digits, dot separators allowed (normalized to digits). Requires productType PHYSICAL. When absent, Outpost predicts the code from title, description, and category.
lineItems[].category
string
No
Free-text product category (e.g. "Watches", "Trading Cards"). Improves HS code prediction accuracy when hsCode is not provided; ignored otherwise.
lineItems[].images
array
No
Public product image URLs. Stored with the product classification for future model training; not sent to the classification engine.
shipFrom
object
No
Ship-from origin address for cross-border duty. Requires at least one PHYSICAL line item. When the origin country differs from the destination, the cart routes to the duty provider.
shipFrom.line1
string
No
Primary address line
shipFrom.line2
string
No
Secondary address line
shipFrom.city
string
No
City name
shipFrom.state
string
No
State/province code
shipFrom.postalCode
string
No
Postal/ZIP code
shipFrom.country
string
Conditional
ISO 3166-1 alpha-2 country code. Required whenever shipFrom is present.
evidence
object
Tax evidence.
evidence.billingCountry
string
ISO 3166-1 alpha-2 billing country code. If provided for Brazil, must be BR.
evidence.ipAddress
string
Customer's IP address.
evidence.paymentMethodCountry
string
No
Payment method country code
Digital and physical goods
Pass productType explicitly on every line: DIGITAL for digital products and services, PHYSICAL for goods that ship. Any PHYSICAL line requires customer.shippingAddress - physical-goods tax is destination-based.
For a PHYSICAL line, pass as much product data as you can: title, description, category, images, countryOfOrigin. The richer the product text, the more accurate the predicted HS code, and so the duty and tax rates. Already know the full HS code for the destination? Pass hsCode to skip prediction and price duty straight from your code.
Adding shipFrom with an origin country that differs from the destination puts the cart on the cross-border duty path: each PHYSICAL line then needs countryOfOrigin and at least one of title or description, and the response prices import duty per line. Mixed carts are fine - digital lines carry no duty and skip these requirements. Physical goods to the US cannot be priced yet (409 physical_goods_not_supported).
Put each fee or service charge on a goods order - shipping, handling, packaging, your commission - on its own line with SERVICES and an ancillaryType. Outpost taxes a SERVICES line at the rate of the goods it accompanies: it splits the fee across the PHYSICAL lines in proportion to their net amounts and applies each line's rate to its share, so tax.rate on a SERVICES line is the weighted rate. SERVICES lines carry no duty. A cart with a SERVICES line must contain at least one PHYSICAL line priced above zero; otherwise Outpost rejects it with 400 invalid_argument. A digital service sold on its own stays DIGITAL.
For Brazil
Brazil is supported for services, invoiced as an NFS-e under ISS. Telecom and communication services - an eSIM, for example - are not: those need NFCom, which Outpost does not issue yet.
Set taxBehavior to INCLUSIVE when the line amount you send should stand as the service value and the ISS tax base.
CPF and CNPJ are checked for format and check digits only. A well-formed identifier can still be rejected when the e-invoice reaches the authority.
Digital Goods Example
For digital goods pass productType: DIGITAL per line. No shipping address, no duty fields; tax is quoted from the customer's location and evidence. A Dutch consumer buying an annual subscription: 21% VAT on the discounted net amount.
Brazil B2C NFS-e calculations require BRL, customer first and last name, and a BR_CPF tax identifier. In inclusive mode, the submitted line amount remains the service value and ISS tax base; tax is not backed out of the line amount. The response keeps unit price, subtotal, net amount, and total amount at the submitted amount and reports ISS separately.
Brazil requires exactly one BR_CPF or BR_CNPJ identifier. Use BR_CPF for B2C and BR_CNPJ for B2B. If no Brazilian identifier is present, if more than one is present, or if the value fails check-digit validation, the calculation request is rejected before tax is calculated.
{
"code": "invalid_argument",
"errors": [
{
"field": "customer.taxIdentifiers[0].code",
"message": "must be a valid CPF" }
]
}
Physical Goods Example (Cross-Border Duty)
A Japanese wristwatch shipped to a customer in the Netherlands. The cart is on the cross-border duty path: shipFrom (JP) differs from the shipping destination (NL) and the line is PHYSICAL. The line carries no hsCode, so Outpost classifies the product from its title, description, and category and prices duty from the resulting destination-qualified HS code (dutyBasis CLASSIFIED).
Duty (4.5% of the €200.00 net amount = €9.00) is added to the customs value before VAT, so the 21% Dutch VAT applies to goods + duty (21% of €209.00 = €43.89). itemTotalAmount and totalAmount include tax and duty (€252.89); totalDutyAmount reports duty separately and is never folded into taxAmount.
Outpost compares the goods value of the order with the destination's de minimis threshold: €150 in the EU and £135 in the UK, per consignment. Only PHYSICAL lines count towards it - SERVICES and DIGITAL lines, shipping and duty don't. Where a destination applies its threshold per item, Outpost compares the highest unit value instead. Outpost converts the goods value into the threshold's currency when the order is in another currency. With taxBehaviorINCLUSIVE, Outpost compares the value net of the included tax. A destination without a threshold always returns COLLECTING.
Above the threshold the calculation still succeeds with 201 Created: taxCollection is NOT_COLLECTING, taxabilityReason is ABOVE_DE_MINIMIS_THRESHOLD, every line carries 0 tax, and no duty is priced. A tax transaction created from the calculation carries the same two fields. Drive your checkout display from taxCollection, not from a taxAmount of 0: a COLLECTING order can also carry 0 tax.
Response Fields
Parameter
Type
Required
Description
taxCalculationId
string
-
Unique identifier for the calculation
createdAt
string
-
ISO 8601 timestamp when calculation was created
expiresAt
string
-
ISO 8601 timestamp when calculation expires
currency
string
-
Currency code
subTotalAmount
decimal
-
Sum of line item amounts before discounts
discountAmount
decimal
-
Total discount amount applied
netAmount
decimal
-
Amount after discounts, before tax
taxAmount
decimal
-
Total tax amount
totalAmount
decimal
-
Final amount including tax
customer
object
-
Customer information
totalDutyAmount
decimal
-
Total import duty across all line items. Omitted when no line carries duty.
lineItems
array
-
Calculated line items with tax details
lineItems[].tax.rate
decimal
-
Effective tax rate applied to the line
lineItems[].tax.taxAmount
decimal
-
Tax amount for the line
lineItems[].tax.dutyAmount
decimal
-
Import duty for the line. Omitted when the line carries no duty.
lineItems[].tax.dutyRate
decimal
-
Duty rate applied to the line
lineItems[].tax.dutyBasis
string enum
-
How the duty was priced: CLASSIFIED (from a destination-qualified HS code, supplied or predicted) or FALLBACK_ESTIMATE (a conservative per-destination rate used when the line could not be classified).
lineItems[].tax.appliedHsCode
string
-
Destination-qualified HS code the line was actually priced with. Omitted on the FALLBACK_ESTIMATE tier.
lineItems[].tax.charges
array
-
Jurisdiction-level breakdown. Always present. See the charges note below before using it.
evidence
object
-
Tax evidence used for calculation
entity
object
-
The Outpost legal entity acting as the recording seller (present when Tax of Record / liability transfer applies).
entity.companyName
string
-
Legal company name of the recording entity.
taxCollection
string enum
-
Whether Outpost collects tax on this order. COLLECTING - Outpost collects the tax in taxAmount, which can be 0. NOT_COLLECTING - the order's goods value is above the destination's de minimis threshold; every line carries 0 tax and no duty. Always present.
taxabilityReason
string enum
-
Why Outpost doesn't collect tax. ABOVE_DE_MINIMIS_THRESHOLD - the order's goods value is above the destination's de minimis threshold. Omitted when taxCollection is COLLECTING.
Amount and rate fields in responses are returned as decimal strings to preserve precision. Request examples may send decimal values as JSON numbers.
Fields with no value are omitted from the response rather than returned as null. Check whether a key is present, not whether it equals null.
A calculation is valid for 7 days from createdAt. After expiresAt it can no longer be converted into a transaction - create a new one.
Charge Breakdown
Every line item carries a tax.charges array describing the individual jurisdiction-level charges behind the line totals.
Parameter
Type
Required
Description
kind
string enum
-
TAX, IMPORT_DUTY, or IMPORT_FEE
name
string
-
Charge display name as reported by the provider (e.g. "CA STATE TAX", "Standard Rate", "Import Duty")
jurisdiction
string
-
Jurisdiction the charge belongs to. Omitted for duty and fees.
jurisdictionLevel
string enum
-
COUNTRY, STATE, COUNTY, CITY, or DISTRICT. Omitted for duty and fees.
country
string
-
ISO 3166-1 alpha-2 country code
taxType
string enum
-
Normalized tax type: VAT, GST, SALES_TAX, IMPORT_VAT, or OTHER. Omitted for duty and fees.
providerTaxType
string
-
The tax provider's own type label (e.g. "Output", "ImportDuty", "MPF"), passed through unchanged
rate
decimal
-
Rate for this charge
amount
decimal
-
Amount for this charge
taxableAmount
decimal
-
Amount this charge was calculated on
Use taxAmount and dutyAmount for money flows. TAX entries sum to taxAmount and IMPORT_* entries sum to dutyAmount, but the breakdown is for display and reconciliation - do not derive amounts by filtering this list.
Error Responses
HTTP
Code
Description
400
invalid_argument
Missing or invalid field - check field requirements. A malformed body, or an unknown tax identifier type, is reported on the field "body". Includes legacy tax-identifier shapes (e.g. type "CPF" without the BR_ prefix).
400
missing_country_of_origin
A physical line item on a cross-border order has no countryOfOrigin. The field names the line index.
400
missing_classification_text
A physical line item on a cross-border order has neither title nor description - at least one is required to classify the product. The field names the line index.
400
shipping_address_required
The cart contains a PHYSICAL line item but no customer.shippingAddress
400
invalid_state
Please activate Outpost Taxes / Tax of Record to process transactions
409
region_not_activated
Merchant not activated for the customer's tax jurisdiction
409
region_not_supported
Customer location outside supported jurisdictions
409
physical_goods_not_supported
Physical goods cannot be priced for that destination yet
409
integration_credentials_invalid
The tax provider rejected the configured integration credentials
409
integration_not_configured
Tax compliance integration is not configured
422
nfse_validation_failed
Brazil NFS-e pre-payment validation rejected the customer data. Each reason is returned on the field "customer".
502
tax_provider_unavailable
The tax provider is temporarily unavailable. Safe to retry with backoff - this is the only retryable failure on this endpoint.
401
-
Invalid or missing Authorization token
Code Example
# Step 2: Calculate tax for the transactioncurl -X POST "https://api.outpostanywhere.com/api/tax/calculations" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"currency": "EUR",
"taxBehavior": "EXCLUSIVE",
"customer": {
"merchantCustomerReference": "CUST-001",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"billingAddress": {
"line1": "123 Main St",
"city": "Berlin",
"postalCode": "10115",
"country": "DE"
}
},
"lineItems": [
{
"merchantLineItemReference": "ITEM-001",
"productCode": "SKU-123",
"description": "Sample Product",
"productType": "DIGITAL",
"unitPrice": 19.99,
"quantity": 1
}
],
"evidence": {
"billingCountry": "DE",
"ipAddress": "192.168.1.1",
"paymentMethodCountry": "DE"
}
}' | jq
# Response: 201 Created with taxCalculationId# Save the taxCalculationId for the Store step
Create Tax Transaction
POST/api/tax/transactions
Converts a valid tax calculation into a confirmed tax transaction. This endpoint should be called when an order is finalized/paid. Only call after payment authorization/capture succeeds.
Idempotent by merchantTransactionReference: retrying with the same taxCalculationId and reference returns the already-created transaction with 200 - safe to resend after a timeout or lost response, and no duplicate is recorded. Reusing the reference with a different calculation returns 400 invalid_state.
On create, Outpost validates structure and required fields synchronously and rejects malformed requests immediately. Authority clearance (signed submission / e-invoice authorization) is asynchronous. Retrieve invoices and e-invoice documents from Invoicing, and explicit pending/cleared/rejected status and webhooks are on the roadmap.
ID of the tax calculation generated by Outpost to convert
merchantTransactionReference
string
Yes
Your unique order/transaction reference. Also the idempotency key: retrying with the same reference and taxCalculationId returns the existing transaction with 200; reusing it with a different calculation returns 400.
payment
object
No
Payment processor information
payment.processor
string
No
Payment processor name (e.g., "stripe", "adyen")
payment.paymentReference
string
No
Payment processor transaction ID
Response 200 OK
The transaction carries the taxCollection and taxabilityReason of the calculation it was created from - see De Minimis Threshold.
Missing or invalid field - check field requirements. taxCalculationId must be a valid UUID.
400
invalid_state
Tax calculation has expired. Returned on the field taxCalculationId - create a new calculation.
400
invalid_state
Tax calculation has already been used - under a different merchantTransactionReference. Returned on the field taxCalculationId. An identical retry (same calculation, same reference) returns 200 with the existing transaction instead.
400
invalid_state
Transaction with that merchantTransactionReference already exists - created from a different taxCalculationId. Returned on the field merchantTransactionReference. An identical retry returns 200 with the existing transaction instead - see Idempotency.
400
invalid_state
Please activate Outpost Taxes / Tax of Record to process transactions. Returned on the field status.
400
invalid_state
The transaction comes from a customer location that is not activated by Outpost. Note this is a 400 here, not the 409 region_not_activated returned by Create Tax Calculation.
400
invalid_state
MoR product is already enabled in this region
404
not_found
Tax calculation not found
Code Example
# Step 3: Store the transaction using taxCalculationId from calculate responsecurl -X POST "https://api.outpostanywhere.com/api/tax/transactions" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"taxCalculationId": "'"$TAX_CALCULATION_ID"'",
"merchantTransactionReference": "TXN-001",
"payment": {
"paymentReference": "PAY-001",
"processor": "stripe"
}
}' | jq
# Response: 200 OK with TaxTransactionResponse
List Tax Transactions
GET/api/tax/transactions
Lists the tax transactions committed on your account, newest first. Results are cursor-paginated, and can be narrowed to a single order with merchantTransactionReference.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Content-Type
-
Yes
application/json
Query Parameters
Parameter
Type
Required
Description
merchantTransactionReference
string
No
Filter by the merchant transaction reference the transactions were created with. Omit to list every transaction.
size
integer
No
Page size, between 1 and 100. Defaults to 20.
cursor
string
No
Cursor returned as nextCursor by the previous call. Omit it to fetch the first page.
Transactions on this page. Each entry is a full TaxTransactionResponse - the same object Create Tax Transaction and Get Tax Transaction return.
transactions[].transactionId
string
-
Outpost identifier of the tax transaction
transactions[].merchantTransactionReference
string
-
Your reference for the order the transaction was committed under
transactions[].refunded
boolean
-
Whether the transaction has been refunded
transactions[].createdAt
string
-
ISO 8601 timestamp when the transaction was created
transactions[].transactionDate
string
-
ISO 8601 date the sale is booked on
transactions[].currency
string
-
ISO 4217 currency code
transactions[].subTotalAmount
decimal
-
Sum of line item amounts before discounts
transactions[].discountAmount
decimal
-
Total discount applied across line items
transactions[].netAmount
decimal
-
Taxable base after discounts
transactions[].taxAmount
decimal
-
Total tax on the transaction
transactions[].totalAmount
decimal
-
Net amount plus tax
transactions[].customer
object
-
Customer, addresses and tax identifiers recorded on the transaction
transactions[].payment
object
-
Processor and payment reference supplied when the transaction was created
transactions[].lineItems
array
-
Line items with their per-line tax breakdown
transactions[].refundsOnTransaction
array
-
Line items refunded against this transaction. Empty when nothing has been refunded.
transactions[].evidence
object
-
Location evidence used to source the sale
transactions[].taxCollection
string enum
-
Whether Outpost collects tax on this order, as decided on the calculation the transaction was created from. COLLECTING - Outpost collects the tax in taxAmount. NOT_COLLECTING - the order's goods value is above the destination's de minimis threshold; every line carries 0 tax and no duty. Always present.
transactions[].taxabilityReason
string enum
-
Why Outpost doesn't collect tax. ABOVE_DE_MINIMIS_THRESHOLD - the order's goods value is above the destination's de minimis threshold. Omitted when taxCollection is COLLECTING.
nextCursor
string
-
Cursor for the next page. Pass it back as cursor. Omitted on the last page - stop paging when it is absent.
Page through by passing the nextCursor of one response as the cursor of the next request, keeping every other parameter identical. The last page omits nextCursor - do not page on a count of returned rows, a full page can still be the last one.
Error Responses
HTTP
Code
Description
400
invalid_argument
size is outside 1-100, or cursor is not a cursor issued by a previous call
Get Tax Transaction
GET/api/tax/transactions/{transaction_id}
Retrieves the details of an existing tax transaction.
Path Parameters
Parameter
Type
Required
Description
transaction_id
string
Yes
ID of the transaction
Response 200 OK
Returns a TaxTransactionResponse object (same structure as Create Tax Transaction response).
Error Responses
HTTP
Code
Description
400
invalid_argument
transaction_id is not a valid transaction id
404
not_found
Transaction not found
Get Transaction Refunds
GET/api/tax/transactions/{transaction_id}/refunds
Retrieves all refunds associated with a transaction.
Creates a refund for one or more line items in an existing transaction.
Each refund line refunds the full remaining amount of the original line by default. To refund only part of a line, set amount on that line - a line may be refunded several times, cumulatively up to its original total. The request-level taxBehavior decides how those amounts are read: EXCLUSIVE (the default) treats them as net of tax, INCLUSIVE as gross including tax. It is ignored for lines without an amount.
Idempotent by merchantRefundReference: retrying with the same reference, transaction, and refund line items returns the already-created refund with 200. Reusing the reference against a different transaction, or with different line items or amounts, returns 400 invalid_state.
Your unique refund reference. Also the idempotency key: an identical retry (same transaction and refund line items) returns the existing refund with 200; reusing it with different content returns 400.
refundDate
string
No
ISO 8601 date/time of the refund
taxBehavior
string enum
No
Allowed values: EXCLUSIVE, INCLUSIVE. Defaults to EXCLUSIVE. Sets how refund line amount values are read: EXCLUSIVE treats them as net of tax, INCLUSIVE as gross including tax. Ignored for lines without an amount.
refundLineItems
array
Yes
Array of line items to refund (minimum 1)
refundLineItems[].lineItemId
string
Yes
ID of the original line item
refundLineItems[].refundLineItemReference
string
Yes
Your unique reference for this refund item
refundLineItems[].refundReason
string
Yes
Reason for the refund
refundLineItems[].amount
string
No
Amount to refund for this line, interpreted per the request-level taxBehavior. Omit to refund the line's full remaining amount. A line may be refunded multiple times cumulatively up to its total.
Partial Refund Example
Refunds 40.00 net of tax against a line that was originally sold for 99.99. The remaining 59.99 stays refundable under a later refund reference.
Missing or invalid field. refundDate must match yyyy-MM-ddTHH:mm:ssZ and cannot be later than today.
400
invalid_state
Refund with that merchantRefundReference already exists - on a different transaction or with different line items/amounts. Returned on the field merchantRefundReference. An identical retry returns 200 with the existing refund instead.
404
not_found
Transaction or line items not found
Import Catalogue Product
POST/api/catalogue/products
Imports a single product variant into your catalogue for tax classification. Each call imports one variant. To model a product that comes in multiple options (size, colour, plan tier), send one request per variant and group them under a shared parent product.
Parent product id. null when the product is its own group (standalone).
title
string
-
Product title.
requiresShipping
boolean
-
Whether the item ships physically.
status
string
-
Classification status: IMPORTED, EXTRACTED, READY_FOR_CLASSIFICATION, APPROVED, or ARCHIVED. A fresh import returns IMPORTED.
approvedTaxCode
string | null
-
Operator-approved tax code. null until a tax code is approved.
predictedTaxCode
string | null
-
Classifier-predicted tax code. null until classification runs.
Product grouping
Two fields control grouping: productId identifies the variant (the sellable unit), and productGroupId identifies the parent product. There are two ways to structure a product:
Standalone product - omit productGroupId. The variant becomes its own group and the response returns productGroupId as null. Use this for single-option items such as an eBook or a one-off SKU.
Multi-variant product - send several requests that share one productGroupId, each with a distinct productId. Every call attaches one variant to the same parent product - for example group TSHIRT-001 with variants TSHIRT-001-S, TSHIRT-001-M and TSHIRT-001-L.
Product-level (title, description, category, imageUrl) is keyed by the group. Keep these identical across all variants of one group.
Variant-level (sku, priceAmount, priceCurrency, taxable, requiresShipping, hsCode, countryOfOrigin) is specific to each variant.
Re-importing
Re-sending a variant with identical content is a no-op.
Changing title or description while the variant is APPROVED clears the approval and returns the variant to READY_FOR_CLASSIFICATION for re-review.
Changing only priceAmount, hsCode or countryOfOrigin updates the variant silently and keeps any approval.
Importing a new productId under an existing productGroupId adds a variant. Tax codes are not inherited; each variant is classified and approved on its own.
Classification lifecycle
The status field moves through IMPORTED → EXTRACTED → READY_FOR_CLASSIFICATION → APPROVED → ARCHIVED. predictedTaxCode is set by the classifier after import; approvedTaxCode is set when an operator approves. A fresh import returns IMPORTED with both codes null.
Note: catalogue tax codes are operator-facing today. Tax calculations do not automatically resolve a stored approvedTaxCode; tax is still determined per line item at calculation time.
Error Responses
HTTP
Code
Description
400
validation_error
Missing required field - productId, title, or requiresShipping
401
-
Invalid or missing Authorization token
409
-
Conflict - the product could not be imported in its current state
Code Example
# Import a product variant into the cataloguecurl -X POST "https://api.outpostanywhere.com/api/catalogue/products" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"productId": "TSHIRT-001-M",
"productGroupId": "TSHIRT-001",
"title": "Classic T-Shirt",
"requiresShipping": true,
"sku": "TSHIRT-001-M",
"priceAmount": 24.99,
"priceCurrency": "USD"
}' | jq
# Response: 201 Created with the product status and tax codes# Omit productGroupId to import a standalone product
Resource
Proforma Invoices
Issue a proforma invoice for a B2B customer paying by bank transfer.
Proforma Invoice Entry Points
Two endpoints create a proforma invoice, and both produce the same document. They differ in where the tax comes from and in the shape of the request body.
After creation the two are identical: issuance, polling, the webhook, and the PDF all behave the same way.
Brazil E-invoicing
Outpost files an NFS-e with the municipality when it issues the proforma invoice, so the proforma invoice is fiscal from that moment. Once issued it cannot be edited: cancel it and create a new one.
Creating from a tax calculation lets the customer agree to the tax before Outpost files anything.
You do not need to show the customer the tax before the proforma invoice exists.
You want the customer to see the tax first, and to issue only once they accept it.
Tax source
Outpost calculates it from the body you send, as it creates the proforma invoice.
Outpost takes the total, line items, and recipient from a calculation you already made.
The two-step path
Calculation limits
Cite the calculation within two hours of making it. Outpost refuses one cited in the last five minutes of that window. The expiresAt it returns is the calculation’s own seven-day expiry and does not govern this.
Cite a calculation once. Outpost answers a second attempt with 422 tax_calculation_already_used rather than replaying the first proforma invoice.
Request shape differences
Tax calculation
Direct create
Identifier type
BR_CNPJ
CNPJ
Issuing country
Part of the type - there is no country field
A separate country field
Unknown type
Rejected - the type is a closed set
Accepted - the type is free text
Tax regime
customer.taxIdentifiers[].buyerTaxRegime
recipient.buyerTaxRegime
Municipal service code
lineItems[].jurisdiction.br.municipalServiceCode
lineItems[].classifications
Company name
customer.legalName
recipient.legalName
Create Proforma Invoice
POST/api/proforma-invoices
Creates a proforma invoice for a B2B customer paying by bank transfer: a non-fiscal request for payment, stating what is owed, to whom, and how to pay, before Outpost receives the money. To show the customer the tax before the document exists, create from a tax calculation instead.
Returns the proforma invoice handle. Amounts and the PDF aren’t included: Outpost links the tax transaction and renders the document afterwards, normally within seconds. Fetch the PDF from GET /api/proforma-invoices/{id}/document once status is ISSUED.
Outpost sends proforma_invoice.issued when the document is ready, and proforma_invoice.issuance_failed when it cannot issue the document. We recommend treating the webhook as the completion signal and polling GET /api/proforma-invoices/{id} as the fallback, using the Location and Retry-After the response carries. The handle’s status stays PENDING_TAX_TRANSACTION, so only the poll reports current state.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Content-Type
-
Yes
application/json
Idempotency-Key
string
Yes
Unique key for this submission attempt, at most 255 characters. Replaying the same key with the same body returns the original handle instead of creating a second proforma invoice.
Request Body Parameters
Parameter
Type
Required
Description
jurisdiction
string
Yes
Tax jurisdiction the invoice is issued under (ISO 3166-1 alpha-2). Determines numbering, format, and legal text.
total
object
Yes
Invoice total
total.amount
string
Yes
Total amount as a decimal string (e.g., "1111.00")
total.currency
string
Yes
ISO 4217 currency code (e.g., GBP, EUR, USD)
recipient
object
Yes
The B2B customer being invoiced
recipient.legalName
string
Yes
Registered legal name of the customer
recipient.address
object
Yes
Customer billing address
recipient.address.line1
string
Yes
Primary address line
recipient.address.line2
string
No
Secondary address line
recipient.address.locality
string
Yes
City or locality
recipient.address.region
string
Yes
State, province, or region
recipient.address.postalCode
string
Yes
Postal or ZIP code
recipient.address.country
string
Yes
ISO 3166-1 alpha-2 country code
recipient.taxIdentifiers
array
Yes
Customer tax identifiers (e.g., CNPJ, VAT)
recipient.taxIdentifiers[].type
string
Yes
Identifier type (e.g., VAT, EIN)
recipient.taxIdentifiers[].code
string
Yes
The identifier value
recipient.taxIdentifiers[].country
string
Yes
Issuing country (ISO 3166-1 alpha-2)
recipient.contact
object
Yes
Customer contact details
recipient.contact.email
string
Yes
Email address for invoice delivery
recipient.buyerTaxRegime
string
Conditional
BR_CNPJ only. Allowed values: SIMPLES_NACIONAL, LUCRO_PRESUMIDO, LUCRO_REAL. Required for a CNPJ buyer by Brazilian NFS-e rules.
provider
object
Yes
The entity supplying the goods or services
provider.providerName
string
Yes
Legal name of the supplying entity
lineItems
array
Yes
One or more invoice line items
lineItems[].description
string
Yes
Description of the item
lineItems[].quantity
string
Yes
Quantity as a decimal string (e.g., "2")
lineItems[].unitPrice
object
Yes
Price per unit
lineItems[].unitPrice.amount
string
Yes
Unit price as a decimal string (e.g., "555.50")
lineItems[].unitPrice.currency
string
Yes
ISO 4217 currency code (e.g., GBP, EUR, USD)
lineItems[].classifications
array
No
Tax or product classification codes for the item
issueDate
string
Yes
Issue date (ISO 8601 date, YYYY-MM-DD)
dueDate
string
Yes
Payment due date (ISO 8601 date, YYYY-MM-DD)
notices
array
No
Free-text notices Outpost prints on the proforma invoice, such as payment instructions. No entry may be blank.
merchantReference
string
No
Your own reference for this proforma invoice, such as an order ID. Outpost echoes it back in the response so you can match the proforma invoice to your order. Only one live proforma invoice may hold a given reference.
Path of the proforma invoice to poll: /api/proforma-invoices/{id}. It is the only authority on current state.
Retry-After
string
-
Seconds to wait before the first poll. Always 2.
Response Fields
Parameter
Type
Required
Description
id
string (UUID)
-
Outpost identifier for the proforma invoice. Use it to poll, fetch the document, delete, and to match webhook events.
number
string
-
Proforma invoice number assigned at creation
status
string
-
Always the constant PENDING_TAX_TRANSACTION. It is never refreshed, replays included, so do not read progress from it - poll GET /api/proforma-invoices/{id} instead.
merchantReference
string
-
Your reference, echoed back from the request. Null when you did not send one.
Error Responses
HTTP
Code
Description
400
invalid_argument
Missing or invalid required field (e.g., jurisdiction, recipient, or lineItems)
401
-
Invalid or missing Authorization token
422
unsupported_jurisdiction
Proforma invoices are not yet available for the requested jurisdiction
422
no_payment_destination
No settlement account is configured for the invoice currency, so there is nowhere for the customer to pay
422
fx_rate_unavailable
No FX rate is available for the requested currency pair, so the invoice cannot be priced
422
proforma_tax_input_invalid
The tax inputs are incomplete or inconsistent. The errors list names the fields to correct.
422
nfse_validation_failed
The recipient details do not pass Brazilian e-invoicing (NFS-e) validation. The errors list names the fields to correct.
422
merchant_reference_conflict
A live proforma invoice already holds this merchantReference. The body carries existingProformaInvoiceId. Delete that proforma invoice to release the reference, or use a different one.
422
idempotency_key_reused
You already used this Idempotency-Key with a different request body, so Outpost created nothing.
Code Example
# Create a proforma invoice for a B2B customer paying by bank transfer# The Idempotency-Key is required and must be fresh for each submission attemptcurl -X POST \
"https://api.outpostanywhere.com/api/proforma-invoices" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"jurisdiction": "GB",
"total": { "amount": "1200.00", "currency": "GBP" },
"recipient": {
"legalName": "Acme Corp",
"address": {
"line1": "123 Example Street",
"line2": "",
"locality": "London",
"region": "Greater London",
"postalCode": "EC1A 1BB",
"country": "GB"
},
"taxIdentifiers": [
{ "type": "VAT", "code": "GB123456789", "country": "GB" }
],
"contact": { "email": "billing@acme.example" }
},
"provider": { "providerName": "Example Ltd" },
"lineItems": [
{
"description": "Annual subscription",
"quantity": "1",
"unitPrice": { "amount": "1200.00", "currency": "GBP" },
"classifications": []
}
],
"issueDate": "2026-06-01",
"dueDate": "2026-06-15",
"notices": [],
"merchantReference": "order-8842"
}' | jq
# Response: 202 Accepted - body is {id, number, status, merchantReference}# Location header holds the path to poll, Retry-After is 2
Create Proforma Invoice From A Tax Calculation
POST/api/proforma-invoices/from-tax-calculation
Creates a proforma invoice from a tax calculation you already made. Outpost takes the total, line items, and recipient from the calculation, so you send none of the three. Use this endpoint when the customer has to see the tax before the proforma invoice exists; otherwise create one directly.
Returns the same 202 Accepted handle as direct create. Outpost issues the document, sends the webhooks and serves the PDF exactly as it does there. The calculation carries its own limits - see Proforma invoice entry points.
Request Body Parameters
Headers are the same as direct create, Idempotency-Key included.
Parameter
Type
Required
Description
taxCalculationId
string (UUID)
Yes
The calculation Outpost turns into the proforma invoice, as returned by POST /api/tax/calculations. Outpost takes its total, line items, and recipient.
jurisdiction
string
Yes
Country whose rules Outpost issues the proforma invoice under (ISO 3166-1 alpha-2, e.g., BR). Must agree with the calculation: a mismatch is 422 tax_calculation_unusable.
issueDate
string
No
Issue date (ISO 8601 date, YYYY-MM-DD). Defaults to today when omitted.
dueDate
string
Yes
Payment due date (ISO 8601 date, YYYY-MM-DD). Must not fall before issueDate.
merchantReference
string
No
Your own reference for this proforma invoice, such as an order ID. Outpost echoes it back in the response so you can match the proforma invoice to your order. Only one live proforma invoice may hold a given reference.
provider
object
No
The entity supplying the goods or services. When omitted, the proforma invoice carries no supplier name.
provider.providerName
string
Conditional
Legal name of the supplying entity. Required when provider is sent.
notices
array
No
Free-text notices Outpost prints on the proforma invoice, such as payment instructions. No entry may be blank.
Error Responses
HTTP
Code
Description
400
invalid_argument
taxCalculationId is missing or not a UUID, jurisdiction is missing or not an ISO 3166-1 alpha-2 code, dueDate is missing or malformed, or dueDate falls before issueDate
401
-
Invalid or missing Authorization token
404
not_found
No such tax calculation for this merchant. A calculation belonging to another merchant reports the same, without revealing that it exists.
422
tax_calculation_already_used
You already cited this calculation. Outpost does not replay the first proforma invoice, so calculate again.
422
tax_calculation_expired
The calculation has passed its own expiresAt. Calculate again.
422
tax_calculation_unusable
The calculation cannot become this proforma invoice. Covers the two-hour citation window, a currency or jurisdiction mismatch, and the content refusals listed below. The errors list names the reason.
422
unsupported_jurisdiction
The requested jurisdiction has no tax currency, so a calculation cannot be cited for it
422
no_payment_destination
No settlement account is configured for the jurisdiction currency, so there is nowhere for the customer to pay
422
nfse_validation_failed
The recipient details on the calculation do not pass Brazilian e-invoicing (NFS-e) validation. The errors list names the fields to correct.
422
merchant_reference_conflict
A live proforma invoice already holds this merchantReference. The body carries existingProformaInvoiceId. Delete that proforma invoice to release the reference, or use a different one.
422
idempotency_key_reused
You already used this Idempotency-Key with a different request body, so Outpost created nothing.
What tax_calculation_unusable covers
The errors list names which reason applies. None are retryable: correct the inputs and calculate again.
Older than the two-hour citation window, or less than five minutes of it remain.
Denominated in a different currency from the one the jurisdiction invoices in.
Belongs to a different region, or is liable to a different legal entity, from the one issuing.
Liable to you rather than to Outpost. Only a merchant-of-record calculation can become a proforma invoice.
Total is not positive, or the line totals do not sum to it.
Customer billing address is missing, or missing its state or another part a proforma invoice needs.
No customer name to invoice - send customer.legalName for a company buyer.
Carries shipping or a PHYSICAL line. Brazilian NFS-e covers services only.
Not exactly one CPF or CNPJ, or a CNPJ without buyerTaxRegime.
Worked example - Brazil B2B, both steps
# Step 1 - calculate the tax and show the customer what it will be.# The CNPJ carries buyerTaxRegime inside the identifier on this endpoint.curl -X POST \
"https://api.outpostanywhere.com/api/tax/calculations" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"currency": "BRL",
"customer": {
"merchantCustomerReference": "customer-4417",
"legalName": "Acme Servicos do Brasil LTDA",
"email": "financeiro@acme.example",
"billingAddress": {
"line1": "123 Example Street",
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01000-000",
"country": "BR"
},
"taxIdentifiers": [
{
"type": "BR_CNPJ",
"code": "12.345.678/0001-95",
"buyerTaxRegime": "LUCRO_REAL"
}
]
},
"lineItems": [
{
"merchantLineItemReference": "line-1",
"productCode": "SUBSCRIPTION",
"description": "Annual subscription",
"jurisdiction": { "br": { "municipalServiceCode": "170101220" } },
"unitPrice": 1000.00,
"quantity": 1
}
],
"taxBehavior": "INCLUSIVE"
}' | jq
# 201 Created - keep taxCalculationId. Cite it within two hours of createdAt;# the expiresAt it returns is the calculation's own seven-day expiry.# Step 2 - turn that calculation into the proforma invoice.# No total, line items or recipient here: all three come from the calculation.curl -X POST \
"https://api.outpostanywhere.com/api/proforma-invoices/from-tax-calculation" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"taxCalculationId": "e3b8c6a1-5f42-4d9b-9c07-1a2b3c4d5e6f",
"jurisdiction": "BR",
"issueDate": "2026-06-01",
"dueDate": "2026-06-15",
"merchantReference": "order-1042",
"provider": { "providerName": "Example Ltd" },
"notices": ["Pay by bank transfer to the account below."]
}' | jq
# 202 Accepted - body is {id, number, status, merchantReference}# Location header holds the path to poll, Retry-After is 2# 422 tax_calculation_already_used if you already cited that calculation
Idempotency
Both create endpoints are idempotent on the Idempotency-Key header: a retried or duplicated submission never produces two proforma invoices for the same order.
Rules
Required on every create, at most 255 characters.
Same key, same body: Outpost replays the original handle and creates no second proforma invoice.
Same key, different body: Outpost rejects the request with 422 idempotency_key_reused and creates nothing.
Generate the key per submission attempt. Never derive it from the body, and never reuse it for a different proforma invoice.
A replay always returns status PENDING_TAX_TRANSACTION, even once Outpost has issued the proforma invoice or failed to. Poll GET /api/proforma-invoices/{id} for current state.
A spent key replays its proforma invoice handle forever, including after that proforma invoice has been deleted. Recreating after a delete needs a new key.
Replacing a proforma invoice
Delete a proforma invoice Outpost has not issued yet and recreate it under the same merchantReference to correct a mistake before the customer sees it.
DELETE /api/proforma-invoices/{id} - 204. The proforma invoice disappears from all reads and releases its merchantReference.
POST /api/proforma-invoices with the corrected body, the same merchantReference, and a NEW Idempotency-Key.
Reusing the old key here replays the deleted proforma invoice handle instead of creating the replacement.
Error envelope
Every error on this resource shares one shape: a machine-readable code and an errors list of field-level messages.
merchant_reference_conflict adds a top-level existingProformaInvoiceId naming the live proforma invoice that holds the reference.
{
"code": "merchant_reference_conflict",
"existingProformaInvoiceId": "019d4d40-15cf-7764-ad6e-b2ec47736bb9",
"errors": [
{ "field": "merchantReference", "message": "merchantReference is already in use" }
]
}
Status Lifecycle
Every proforma invoice starts at PENDING_TAX_TRANSACTION and either reaches ISSUED or ends at the terminal ISSUANCE_FAILED. Read the current status from GET /api/proforma-invoices/{id} - never from the create response.
Status
Meaning
PENDING_TAX_TRANSACTION
Outpost accepted the request and queued it. No tax transaction and no document yet. Normally lasts seconds. Deletable.
ISSUED
Outpost linked the tax transaction and attached the PDF, so the document endpoint returns 200. No longer deletable.
INVOICED
Outpost raised a tax invoice against the proforma invoice.
BOOKED
Outpost booked the proforma invoice in the ledger.
CANCELLATION_REQUESTED
You requested cancellation and Outpost is processing it.
CANCELLED
Outpost cancelled the proforma invoice.
ISSUANCE_FAILED
Terminal. Outpost could not issue the document and will not retry, so no document will exist. issuanceFailure carries the reason; the only code today is proforma_tax_input_invalid. Create a new proforma invoice with corrected inputs.
Get Proforma Invoice
GET/api/proforma-invoices/{id}
Returns the proforma invoice. This is the poll target named by the create response’s Location header and the only authority on current state. It answers 200 OK at every stage of the lifecycle, including PENDING_TAX_TRANSACTION and ISSUANCE_FAILED.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Path Parameters
Parameter
Type
Required
Description
id
string (UUID)
Yes
Outpost identifier for the proforma invoice, returned by create
Current status. Status Lifecycle lists every value and what it means for polling, the document, and deletion.
merchantReference
string
-
Your reference. Null when you did not send one.
issuanceFailure
object
-
Present only when status is ISSUANCE_FAILED
issuanceFailure.code
string
-
Why issuance failed. The only code today is proforma_tax_input_invalid.
issuanceFailure.message
string
-
Human-readable description of the failure
issuanceFailure.failedAt
string
-
ISO 8601 timestamp the failure was recorded
Error Responses
HTTP
Code
Description
400
invalid_argument
id is not a valid UUID
401
-
Invalid or missing Authorization token
404
not_found
No such proforma invoice, it belongs to another merchant, or it has been deleted
Code Example
# Poll the proforma invoice - the only authority on current statecurl -X GET \
"https://api.outpostanywhere.com/api/proforma-invoices/${PROFORMA_INVOICE_ID}" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
# 200 OK at every stage, including PENDING_TAX_TRANSACTION and ISSUANCE_FAILED# 404 if the proforma invoice is unknown, foreign, or deleted
Get Proforma Invoice Document
GET/api/proforma-invoices/{id}/document
Returns a pre-signed link to the proforma invoice PDF. The link is valid for 15 minutes and the endpoint may be called any number of times, so fetch a fresh link whenever you need to show or send the document rather than storing the URL.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Path Parameters
Parameter
Type
Required
Description
id
string (UUID)
Yes
Outpost identifier for the proforma invoice, returned by create
Pre-signed link to the PDF. Show it on your checkout or email it to the customer.
expiresAt
string
-
ISO 8601 timestamp when the link expires (15 minutes). Call this endpoint again for a fresh link - there is no limit on how many times you may fetch it.
Response202 Accepted - The proforma invoice is still being issued and the document does not exist yet. The response carries a Retry-After header - wait that many seconds and call again.
Error Responses
HTTP
Code
Description
401
-
Invalid or missing Authorization token
404
not_found
No such proforma invoice, it belongs to another merchant, or it has been deleted
409
issuance_failed
Issuance failed permanently, so there is no document and never will be. Read issuanceFailure on the proforma invoice for the reason.
Code Example
# Fetch a fresh 15-minute link to the proforma invoice PDFcurl -X GET \
"https://api.outpostanywhere.com/api/proforma-invoices/${PROFORMA_INVOICE_ID}/document" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
# 200 OK with {fileName, url, expiresAt}# 202 Accepted with Retry-After while the proforma invoice is still being issued# 409 issuance_failed once issuance has failed permanently
Delete Proforma Invoice
DELETE/api/proforma-invoices/{id}
Deletes a proforma invoice that has not been issued yet. Use it to withdraw a submission you got wrong, then create the replacement under the same merchantReference.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Path Parameters
Parameter
Type
Required
Description
id
string (UUID)
Yes
Outpost identifier for the proforma invoice, returned by create
Response204 No Content - The proforma invoice was deleted.
Behaviour
Deletion is allowed until the tax transaction is linked. After that the endpoint returns 409 not_deletable and the proforma invoice must be cancelled instead.
Deleting an already-deleted proforma invoice returns 204 as well - the call is idempotent.
Deletion is soft on Outpost’s side and permanent from yours: the proforma invoice disappears from every read, its document is no longer retrievable, and it never comes back.
A deleted proforma invoice releases its merchantReference, so a fresh create may reuse it. merchant_reference_conflict therefore only ever names a live proforma invoice.
Error Responses
HTTP
Code
Description
400
invalid_argument
id is not a valid UUID
401
-
Invalid or missing Authorization token
404
not_found
No such proforma invoice, or it belongs to another merchant
409
not_deletable
The tax transaction is already linked, so the proforma invoice can no longer be deleted. Cancel it instead.
Code Example
# Withdraw a proforma invoice that has not been issued yetcurl -X DELETE \
"https://api.outpostanywhere.com/api/proforma-invoices/${PROFORMA_INVOICE_ID}" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" -i
# 204 No Content on success, and on repeat - the call is idempotent# 409 not_deletable once the tax transaction is linked - cancel it instead# Recreate with the same merchantReference and a NEW Idempotency-Key
Resource
Payment Links
Take a one-off payment on a hosted checkout page, without building a checkout of your own.
Create Payment Link
POST/api/payment-links
Creates a hosted checkout page for a single amount, so you can take a payment without building a checkout of your own. Outpost prices the tax, collects the money as Merchant of Record, and returns the customer to your return URL when they are done.
How it works
Your backend calls POST /api/payment-links with the jurisdiction, amount, return URL, and your own idempotency key.
Outpost returns url - a hosted checkout page that prices tax and collects the payment.
You send the customer to url. When they finish, the page returns them to your returnUrl.
Outpost sends a payment.captured webhook once the money is captured. Fulfil on that event, not on the return redirect.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Content-Type
-
Yes
application/json
Request Body Parameters
Parameter
Type
Required
Description
jurisdiction
string
Yes
ISO 3166-1 alpha-2 country code the sale is made in. It selects the arrangement that prices and collects the payment.
amount
object
Yes
What the customer is asked to pay
amount.amount
string
Yes
A positive decimal string, for example "49.90"
amount.currency
string
Yes
ISO 4217 currency code, for example BRL
returnUrl
string
Yes
Where the hosted page sends the customer once checkout finishes
idempotencyKey
string
Yes
Your key for this link. Sent in the body, not as a header. Reusing it returns the link you already created instead of a second one.
expiresIn
number
No
Lifetime in seconds from creation. Defaults to 7 days (604800) when omitted.
Outpost identifier for the link. Use it to read the link back.
url
string
-
The hosted checkout page. Send the customer here.
status
string
-
PAYABLE, PAID, or EXPIRED
pricedAmount
object
-
The amount the link was created for (amount + currency)
amountDue
object
-
What is still outstanding on the link (amount + currency)
expiresAt
string
-
ISO 8601 timestamp after which the link stops accepting payment
Error Responses
HTTP
Code
Description
400
validation_error
A required field is missing or malformed. The errors list names each offending field.
401
-
Invalid or missing Authorization token
409
no_active_arrangement
No live arrangement covers the requested jurisdiction
409
unsupported_outpost_role
The arrangement for that jurisdiction does not let Outpost collect this payment
Code Example
# Create a hosted payment linkcurl -X POST \
"https://api.outpostanywhere.com/api/payment-links" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jurisdiction": "BR",
"amount": { "amount": "49.90", "currency": "BRL" },
"returnUrl": "https://your-app.example.com/checkout/done",
"expiresIn": 604800,
"idempotencyKey": "order-1042"
}' | jq
# 201 Created - send the customer to url# 409 no_active_arrangement - no live arrangement covers that jurisdiction
Get Payment Link
GET/api/payment-links/{id}
Reads a payment link back, including whether it is still payable and what is outstanding. Use it to render the link’s state in your own UI - fulfil orders on the payment.captured webhook rather than by polling this endpoint.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Path Parameters
Parameter
Type
Required
Description
id
string (UUID)
Yes
The paymentLinkId returned when the link was created
Outpost identifier for the link. Use it to read the link back.
url
string
-
The hosted checkout page. Send the customer here.
status
string
-
PAYABLE, PAID, or EXPIRED
pricedAmount
object
-
The amount the link was created for (amount + currency)
amountDue
object
-
What is still outstanding on the link (amount + currency)
expiresAt
string
-
ISO 8601 timestamp after which the link stops accepting payment
Error Responses
HTTP
Code
Description
401
-
Invalid or missing Authorization token
404
not_found
No such payment link, or it belongs to another merchant
Code Example
# Read the current state of a payment linkcurl -X GET \
"https://api.outpostanywhere.com/api/payment-links/${PAYMENT_LINK_ID}" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
# status PAYABLE - the link is still open# status PAID - the customer has paid; listen for payment.captured to fulfil# status EXPIRED - expiresAt has passed, create a new link
Resource
Invoices
Retrieve the tax invoice for a payment or refund, by Outpost ID or PSP reference, and fetch the invoice for a tax transaction.
Get Payment Invoice by ID
GET/api/payments/{paymentId}/invoice
Retrieves the B2C tax invoice for a payment using the Outpost payment ID.
ISO 8601 timestamp when the download URL expires (15 minutes)
Response202 Accepted - Invoice is still being generated. Retry after a short delay.
Error Responses
HTTP
Code
Description
404
-
Payment/refund not found or does not belong to your merchant account
401
-
Invalid or missing Authorization token
Code Example
# Get payment invoice by Outpost payment IDcurl -X GET \
"https://api.outpostanywhere.com/api/payments/${PAYMENT_ID}/invoice" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
# Response: 200 OK with invoice download URL# Response: 202 Accepted if invoice is still being generated
Response202 Accepted - Invoice is still being generated. Retry after a short delay.
The url is a signed link that expires one hour after the response. Download the file rather than storing the link.
Error Responses
HTTP
Code
Description
400
invalid_argument
transaction_id is not a valid transaction id
404
not_found
Transaction not found
Resource
E-Invoices
Read an electronic invoice filed with a tax authority, and mint download links for its PDF and XML.
Get E-Invoice
GET/api/e-invoices/{id}
Reads an electronic invoice filed with a tax authority - a Brazilian NFS-e, for example - and mints fresh download links for its PDF and XML. E-invoices are raised for you as a side effect of a proforma invoice or a payment, so you discover the id from the source document or from an e-invoice webhook rather than by creating one here.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Path Parameters
Parameter
Type
Required
Description
id
string (UUID)
Yes
E-invoice identifier, as carried by data.eInvoiceId on the e-invoice webhooks
PENDING while the authority has not answered, then ISSUED, FAILED, or CANCELLED
source
object
-
What the e-invoice was raised for. Absent when the source cannot be resolved.
source.type
string
-
proforma_invoice or payment
source.id
string (UUID)
-
Identifier of that proforma invoice or payment
error
object
-
Present only when status is FAILED
error.message
string
-
Why the tax authority rejected the e-invoice
document
object
-
Download links. Absent until the authority has accepted the e-invoice and the files exist.
document.pdfUrl
string
-
Pre-signed link to the e-invoice PDF. Null when no PDF was produced.
document.xmlUrl
string
-
Pre-signed link to the e-invoice XML. Null when no XML was produced.
document.expiresAt
string
-
ISO 8601 timestamp when both links expire (15 minutes). Re-fetch to mint fresh ones.
Notes
The links are minted per request and expire after 15 minutes. Store the id, not the URL.
Do not poll this endpoint to learn the outcome - subscribe to e_invoice.issued, e_invoice.issuance_failed, and e_invoice.cancelled, then call it once to fetch the documents.
A FAILED e-invoice never gains a document. Read error.message, correct the data, and re-issue.
Error Responses
HTTP
Code
Description
400
invalid_argument
id is not a UUID
401
-
Invalid or missing Authorization token
404
not_found
No such e-invoice, it belongs to another merchant, or the underlying invoice does not require e-invoicing
Code Example
# Read an e-invoice and mint fresh document linkscurl -X GET \
"https://api.outpostanywhere.com/api/e-invoices/${E_INVOICE_ID}" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
# status PENDING - the authority has not answered yet, poll again# status ISSUED - document.pdfUrl and document.xmlUrl are valid for 15 minutes# status FAILED - error.message says why, and no document exists
Resource
Stripe Billing
Outpost-as-MoR endpoints used when you run Stripe Billing on your own account. Conceptual walkthrough lives under Integrations → Stripe Billing.
Three outbound endpoints covering the payment lifecycle (provision a SetupIntent, confirm the payment, refund), plus inbound webhook events on a single channel. Authentication uses the same Bearer token described in Authentication.
Provisions a SetupIntent on Outpost’s PSP account with usage=off_session.
The returned client_secret is passed to Stripe Elements in the browser so the customer can confirm payment details directly against Stripe - no sensitive payment data ever touches the merchant or Outpost servers.
The set of payment methods offered to the customer is controlled by payment_method_types on the request body (defaults to ["card"]).
Array of Stripe PM types to enable on the SetupIntent. Defaults to ["card"]. Supported: card, us_bank_account, sepa_debit, bacs_debit, au_becs_debit. Mandate text for direct debits is rendered automatically by Payment Element.
tax_calculation_id
string
No
Reference to a tax calculation returned by POST /api/tax/calculate. Binds the tax breakdown to this SetupIntent so it carries through to the first chargeable invoice (e.g. at trial end).
Pass to Stripe Elements via loadStripe(OUTPOST_PUBLISHABLE_KEY) and confirmSetup({ clientSecret, ... }).
setup_intent_id
string
-
SetupIntent ID on Outpost’s PSP account.
mor_customer_id
string
-
Outpost’s Stripe Customer ID (empty Customer with metadata pointing back at your merchant_customer.stripe_id). Persist for future reference.
status
string
-
One of requires_payment_method, requires_confirmation, requires_action, processing, succeeded.
Error Responses
HTTP
Code
Description
400
invalid_request
Malformed body, or invalid value in payment_method_types.
401
-
Missing or invalid Bearer token.
403
merchant_suspended
Merchant account is suspended, or the token lacks the required scope.
404
tax_calculation_not_found
The tax_calculation_id does not resolve to a known calculation.
409
idempotency_conflict
Same Idempotency-Key replayed with a different request body.
422
validation_error
A payment_method_types value is not enabled for your account on Outpost’s PSP.
429
rate_limited
Burst exceeded your quota. Retry after backoff.
503
psp_unavailable
Upstream PSP (Stripe) returned 5xx or timed out. Safe to retry with the same Idempotency-Key.
Create Payment Intent
POST/api/payments/stripe/payment-intentsStripe
Used for the immediate-payment signup variant - the customer is charged at signup (no free trial). Outpost provisions a PaymentIntent on its PSP account with setup_future_usage=off_session so the same card can be charged for renewals later.
The browser confirms with stripe.confirmPayment() (atomic card collection + 3DS + charge). Outpost learns the outcome via its own payment_intent.succeeded webhook - no follow-up Outpost API call is required.
Pass to Stripe Elements via loadStripe(OUTPOST_PUBLISHABLE_KEY) and confirm with stripe.confirmPayment({ clientSecret, … }).
payment_intent_id
string
-
PaymentIntent ID on Outpost’s PSP account.
mor_customer_id
string
-
Outpost’s Stripe Customer ID (empty Customer with metadata pointing back at your merchant_customer.stripe_id). Persist for future reference.
status
string
-
PaymentIntent status - typically requires_payment_method at this point, and the browser will transition it via confirmPayment().
Error Responses
HTTP
Code
Description
400
invalid_request
Missing or malformed amount / currency / merchant_customer.stripe_id.
401
-
Missing or invalid Bearer token.
403
merchant_suspended
Merchant account is suspended, or the token lacks the required scope.
404
tax_calculation_not_found
The tax_calculation_id does not resolve to a known calculation.
409
idempotency_conflict
Same Idempotency-Key replayed with a different request body.
422
unsupported_currency / amount_out_of_range
Currency not enabled on Outpost’s PSP, amount below the PSP’s minimum, or amount above your per-transaction cap.
429
rate_limited
Burst exceeded your quota. Retry after backoff.
503
psp_unavailable
Upstream PSP (Stripe) returned 5xx or timed out. Safe to retry with the same Idempotency-Key.
After stripe.confirmPayment() succeeds in the browser, you receive payment_intent.id and latest_charge (Stripe ch_…). Use that ch_… as processor_details.custom.payment_reference on payment_records/report_payment on your Stripe account.
Refund Payment
POST/api/payments/{paymentId}/refund
Refunds a previously confirmed payment, in full or in part. Outpost executes the refund on its PSP account and emits a payment.refunded webhook so you can update the corresponding PaymentRecord on Stripe.
Partial refunds are supported - supply amount to refund less than the full charge. Multiple refunds are allowed until the cumulative amount equals the original payment.
Path Parameters
Parameter
Type
Required
Description
paymentId
string
Yes
The Outpost payment_id from the Confirm Payment response.
Request Headers
Parameter
Type
Required
Description
Authorization
string
Yes
Bearer access token.
Idempotency-Key
string
Yes
Required to safely retry refund attempts. Outpost derives downstream PSP idempotency keys from this value.
Request Body
application/json - body is optional - omit for a full refund.
One of succeeded, pending, failed. For cards and Link this is synchronous - for bank debits the refund starts as pending and transitions via webhook.
reason
string | null
-
Echoes the request reason.
processor_references.refund_id
string
-
Refund ID on Outpost’s PSP account (e.g. re_… on Stripe).
created_at
string (ISO 8601)
-
When the refund was created.
Error Responses
HTTP
Code
Description
400
invalid_request
amount exceeds the unrefunded remainder, or currency mismatch.
401
-
Missing or invalid Bearer token.
404
payment_not_found
No payment exists for the given paymentId.
422
payment_not_refundable
Payment is not in a refundable state (e.g. already fully refunded, never succeeded, or charged back).
On success, also call Stripe payment_records.report_refund on your account with processor_details.custom.refund_reference = processor_references.refund_id so the PaymentRecord reflects the refund. The payment.refunded webhook (below) also fires - use whichever signal fits your reconciliation flow.
Verifying webhooks
Outpost signs every webhook delivery with HMAC-SHA256.
The header is Mor-Signature: t=<unix_seconds>,v1=<hex>.
The signed payload is the literal byte string "{t}.{raw_request_body}", keyed with the shared webhook secret Outpost gave you during onboarding.
Recommended: reject deliveries where t is older than five minutes, and dedupe on event.id.
Webhooks - payment.*
WEBHOOKPOST <your_webhook_url>
During each renewal cycle Outpost posts exactly one event to the webhook URL you registered.
All three event types share the same envelope and the same HMAC verification - see Verifying webhooks.
Request Headers
Parameter
Type
Required
Description
Mor-Signature
string
Yes
t=<unix_seconds>,v1=<hex_hmac_sha256>. HMAC computed over "{t}.{raw_request_body}" using the shared webhook secret. Reject deliveries older than ~5 minutes.
Payload Fields
Parameter
Type
Required
Description
id
string
-
Outpost event ID. Use to dedupe.
type
string
-
One of payment.succeeded, payment.failed, payment.requires_action, payment.refunded.
created
integer
-
Unix seconds.
data.object.payment_id
string
-
Outpost-owned payment identifier for this renewal cycle (pay_…). Use as the {paymentId} path param on POST /api/payments/{paymentId}/refund.
data.object.merchant_invoice_id
string
-
Stripe Invoice ID on your account that triggered this renewal. Pass to attach_payment.
data.object.merchant_customer_id
string
-
Customer ID on your Stripe account.
data.object.processor_charge_id
string
-
Charge ID on Outpost’s PSP account. Use as payment_reference on report_payment. Empty on failed / requires_action.
data.object.processor_payment_intent_id
string
-
PaymentIntent ID on Outpost’s PSP account.
data.object.amount
integer
-
For payment.succeeded / failed / requires_action: the payment amount. For payment.refunded: the amount refunded by this event.
data.object.currency
string
-
Three-letter currency code.
data.object.status
string
-
One of succeeded, failed, requires_action, partially_refunded, refunded.
data.object.failure_message
string
No
Human-readable decline reason (present on failed / requires_action).
data.object.decline_code
string
No
PSP decline code, e.g. insufficient_funds.
data.object.refund_id
string
No
Outpost-owned refund identifier. Only on payment.refunded.
data.object.processor_refund_id
string
No
Refund ID on Outpost’s PSP account. Only on payment.refunded.
data.object.amount_refunded_total
integer
No
Cumulative amount refunded across all refunds on this payment. Only on payment.refunded.
data.object.reason
string
No
Refund reason. Only on payment.refunded.
Example - payment.succeeded
After verifying the signature, call Stripe POST /v1/payment_records/report_payment on the merchant’s account with outcome=guaranteed and processor_details.custom.payment_reference = processor_charge_id, then POST /v1/invoices/{merchant_invoice_id}/attach_payment to mark the invoice paid.
Leave the merchant invoice open - Stripe Billing’s Smart Retries will trigger another invoice.created on the next attempt, which Outpost will pick up and retry.
Fired after every successful refund - full or partial. Use amount_refunded_total to decide whether the payment is now fully or partially refunded and call payment_records.report_refund on Stripe to keep the PaymentRecord in sync.
Outpost gives up after 4xx (treat as permanent failure on your side).
5XX
-
Outpost retries with exponential backoff.
Async-settled payment methods
For cards and Link, payment.succeeded arrives within seconds of the PaymentIntent confirming.
For bank-debit methods (ACH, SEPA, BACS, BECS) the PaymentIntent first transitions through processing and the succeeded event only fires after settlement (days later).
Returns and mandate disputes that arrive after settlement are not yet exposed as a dedicated event - contact Outpost before rolling out async methods in production.
Resource
Webhooks
Register endpoints, verify delivery signatures, and consume the full event catalog across every domain.
Webhooks
Proforma invoices are issued asynchronously, and the bank transfers that pay them settle asynchronously too - sometimes minutes, sometimes days later. Rather than polling, register a webhook endpoint and Outpost will notify your backend when the proforma invoice is issued or its issuance fails, and again the moment the money settles, so you can release the order or activate the subscription. The same endpoint also receives dispute and pre-chargeback alert events, so you subscribe once and pick the event types you need.
Register Webhook
POST/api/webhooks
Registers an endpoint to receive event notifications. The response includes a secret that is shown only once - store it to verify incoming signatures.
Request Headers
Parameter
Type
Required
Description
Authorization
-
Yes
Bearer token for authentication
Content-Type
-
Yes
application/json
Request Body Parameters
Parameter
Type
Required
Description
url
string
Yes
HTTPS endpoint that will receive event POSTs. Must resolve to a public address.
events
string[]
Yes
Event types to subscribe to. Must contain at least one of the event types listed below.
description
string
No
Human-readable label for this endpoint. Stored for your reference and not returned by the API.
Webhook endpoint identifier. Use it to list or delete the endpoint.
url
string
The registered destination URL
events
string[]
Subscribed event types
secret
string
Signing secret. Returned once on creation - store it securely to verify the Outpost-Signature header.
status
string
ACTIVE or DISABLED
createdAt
string
ISO 8601 creation timestamp
Error Responses
HTTP
Code
Description
400
unknown_event
events is empty or contains an event type that does not exist
400
invalid_url
url is not a valid HTTPS URI, or its host cannot be resolved or is not public
401
-
Invalid or missing Authorization token
409
webhook_endpoint_limit_exceeded
You already have the maximum of 10 active endpoints. Delete one before registering another.
Code Example
# Register an endpoint to receive settlement notificationscurl -X POST \
"https://api.outpostanywhere.com/api/webhooks" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.example.com/webhooks/outpost",
"events": ["proforma_invoice.settled"],
"description": "Settlement notifications for B2B bank transfers"
}' | jq
# Response: 201 Created - store the returned "secret" to verify signatures
List Webhooks
GET/api/webhooks
Returns all webhook endpoints registered for your merchant account.
# List all registered webhook endpointscurl -X GET \
"https://api.outpostanywhere.com/api/webhooks" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN" | jq
Delete Webhook
DELETE/api/webhooks/{webhookId}
Removes a webhook endpoint. It immediately stops receiving events.
Path Parameters
Parameter
Type
Required
Description
webhookId
string
Identifier returned when the webhook was registered
Response204 No Content - The webhook was deleted.
Error Responses
HTTP
Code
Description
401
-
Invalid or missing Authorization token
404
not_found
No such webhook endpoint, or it belongs to another merchant. Deleting an already-deleted endpoint succeeds.
Code Example
# Delete a webhook endpoint so it stops receiving eventscurl -X DELETE \
"https://api.outpostanywhere.com/api/webhooks/${WEBHOOK_ID}" \
-H "Authorization: Bearer $OUTPOST_ACCESS_TOKEN"# Response: 204 No Content
Webhook events
Each subscribed event is delivered as an HTTP POST to your endpoint with a JSON body.
Delivery Semantics
Acknowledge a delivery with any 2xx status. Each attempt has 30 seconds to respond.
A 429 or 5xx response is retried. Any other 4xx response is a permanent failure and stops delivery of that event.
Retries use exponential backoff: at most 8 attempts, the first 10 seconds after the failure, tripling each time, capped at 4 hours between attempts and 9 hours in total.
Deliveries are at-least-once - deduplicate on the full event id.
The event id is deterministic per entity and topic, so a redelivered event always carries the same id, and two topics about the same entity never collide.
Always verify the Outpost-Signature header before acting on a payload.
Verifying Signature
Every delivery includes an Outpost-Signature header of the form t=<timestamp>,v1=<hmac>. Compute an HMAC-SHA256 of {t}.{rawBody} with your webhook secret and compare it against v1 in constant time. Reject requests whose timestamp is older than five minutes to prevent replay.
// Verify the Outpost-Signature header before trusting the payloadimport javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
booleanverify(String rawBody, String header, String secret)throws Exception {
// header looks like: t=1717243200,v1=5257a869e7... Map<String, String> parts = parseHeader(header);
String signedPayload = parts.get("t") + "." + rawBody;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(), "HmacSHA256"));
byte[] digest = mac.doFinal(signedPayload.getBytes());
String expected = HexFormat.of().formatHex(digest);
return MessageDigest.isEqual(expected.getBytes(), parts.get("v1").getBytes());
}
Events
proforma_invoice.issued
A proforma invoice has been issued and its PDF is attached, so the document endpoint already returns 200. This is the completion signal for an asynchronous create.
proforma_invoice.issuance_failed
Issuance failed permanently. No document exists for this proforma invoice and none ever will - create a new one with corrected inputs.
proforma_invoice.settled
The bank transfer for a proforma invoice has been received and reconciled. Safe to fulfill the order.
dispute.action_needed
A dispute was opened on one of your payments and evidence is needed. The payload carries the deadline and a link to the dispute in the Outpost dashboard.
dispute.outcome
A dispute has been resolved. The payload carries the final outcome.
dispute.revision_requested
Evidence you submitted was sent back for revision. The payload carries the reviewer note and the remaining deadline, so you can correct and resubmit before the dispute is conceded.
pre_chargeback_alert.received
A pre-chargeback alert was raised on one of your payments and matched to it. Delivered only once the alert is matched to a payment.
pre_chargeback_alert.outcome
Outpost finished handling a pre-chargeback alert. The payload says whether the payment was refunded, and repeats the alert details.
payment.captured
A card payment has been captured. This is the earliest reliable signal that the money is yours to act on - settlement and reconciliation follow later. Use taxCalculationId to tie the capture back to the calculation you priced the order with.
payment.settled
Coming soon
A card payment has been settled - the funds are reconciled against a payout, which happens some time after payment.captured. The externalRef ties this event back to the original tax calculation.
Not delivered yet. This event is documented so you can design for it, but Outpost does not send it today and the payload may still change. Do not make fulfillment depend on it.
e_invoice.issued
An e-invoice (NFS-e) has been accepted by the tax authority. The event carries no document links - call GET /api/e-invoices/{id} with data.eInvoiceId to mint fresh pre-signed PDF and XML URLs.
e_invoice.issuance_failed
The tax authority rejected the e-invoice. No document will exist for it. The payload carries the rejection reason so you can correct the data and re-issue.
e_invoice.cancelled
A previously issued e-invoice has been cancelled with the tax authority. Any document links you already minted stop being valid for fiscal purposes.
report.available
Coming soon
A proceeds report has been finalized. The payload includes a pre-signed URL to download the report file.
Not delivered yet. This event is documented so you can design for it, but Outpost does not send it today and the payload may still change. Do not make fulfillment depend on it.
Common fields
Every event shares these top-level fields. Event-specific fields live inside data.
Parameter
Type
Required
Description
id
string
Event identifier. Deterministic per entity and topic, so it is the same on every retry of the same event. The topic is part of the id - one proforma invoice emits evt_issued_<proformaInvoiceId>, evt_issuance_failed_<proformaInvoiceId>, and evt_<proformaInvoiceId> for proforma_invoice.settled - so deduplicate on the full id, never on the entity id inside it.