Create an escrow transaction

Creates a draft escrow transaction. Once created, it can be paid using the /pay endpoint. See our purchase flow developer guide for more info. The request payload for an escrow transaction is identical to the request payload for a create invoice API call.

Request
Security:
tilia_auth (write_invoices)
Request Body schema: application/json

Escrow Transaction resource

account_id
required
string <UUID4>

The buyer's Tilia Pay Account ID.

reference_type
string

A type for your reference_id.

reference_id
string

Your own reference ID.

description
string

A user-facing description for this invoice. May be used in receipts and transaction history pages, and viewed by support agents.

metadata
string

An arbitrary data structure associated with this invoice. POSTed back to your webhook upon invoice completion.

Array of objects

The buyer's payment method to use for purchase. NOTE: if the line items are priced in real currency, this field is required.

required
Array of objects (LineItems)

The line items to be purchased. NOTE: If line items are priced in virtual currency, the payment method section should be omitted, as Tilia will handle it for you.

Responses
201

Successfully created escrow transaction.

400

Invalid input

401

Unauthorized access.

500

Service unavailable or server error.

post/v2/escrow
Request samples
application/json
{
  • "account_id": "b2ba9a0f-3d75-44e0-968d-be299cda5d80",
  • "reference_type": "Acme order number",
  • "reference_id": "8987749",
  • "description": "Digital product order",
  • "metadata": "{“key1”: {“key2”: 3}}",
  • "payment_methods": [
    ],
  • "line_items": [
    ]
}
Response samples
application/json
{
  • "id": "esc_1rS7ZIi4RdNzOh1M0f10NrnI4mp",
  • "account_id": "b2ba9a0f-3d75-44e0-968d-be299cda5d80",
  • "escrow_invoice_id": "354121c4-57d2-4317-939f-9af54be4e3fd",
  • "commit_invoice_id": "7ad23f26-4111-4ad0-9c3a-2e0231be70cf",
  • "cancel_invoice_id": "9e56b8b6-1235-46e8-b3a1-6e786151d3ec",
  • "status": "OPEN",
  • "integrator": "tilia",
  • "created": "string",
  • "updated": "string"
}