Checkout (public)

Get the checkout status

Returns what the public checkout page shows: the invoice status and the payment attempt that paid it or is under way, else the latest one. It contains nothing private to the business. Responses are not cached. Rate limits: 600 per minute per IP address and 1200 per network.

GET
/api/v1/invoices/{id}/status

Path Parameters

id*string

Invoice id, starting with inv_.

Response Body

The checkout state.

application/json
  1. response

The public view of an invoice used by the checkout page.

id*string
object*string
mode*Mode

Always live on the objects your API key creates and reads. Only demo store invoices, seen through the public checkout endpoints, are test.

Value in"live""test"
status*InvoiceStatus
Value in"created""awaiting_payment""detected""processing""paid""underpaid""refunded""failed""expired"
merchant*
amount*string
currency*Currency
Value in"USD""EUR""INR"
description*string|null
order_id*string|null
settlement*
late*boolean
extra_payment*boolean
expires_at*string
Formatdate-time
paid_at*|

When the invoice was paid, or null before that.

Formatdate-time
retry_allowed*boolean

True when the invoice can take a new payment attempt (status created, awaiting_payment, refunded or failed) and more than 2 minutes of its lifetime are left.

redirect_url*|

Set only once the invoice is paid.

payment*|

The payment attempt that paid the invoice, else one whose payment is in flight, else the newest; null before a coin is chosen.

payments_delayed*boolean

True when the worker's NEAR Intents health check is failing. Always false for demo store invoices.

email_receipts*boolean

True when the server can send receipt emails. Always false for demo store (test mode) invoices.

receipt_email_set*boolean
Example Request
curl -X GET 'https://example.com/api/v1/invoices/string/status'
Example Response
{  "id": "string",  "object": "checkout",  "mode": "live",  "status": "created",  "merchant": {    "name": "string",    "logo_url": "string"  },  "amount": "string",  "currency": "USD",  "description": "string",  "order_id": "string",  "settlement": {    "symbol": "string",    "blockchain": "string",    "amount": "string"  },  "late": true,  "extra_payment": true,  "expires_at": "2019-08-24T14:15:22Z",  "paid_at": "2019-08-24T14:15:22Z",  "retry_allowed": true,  "redirect_url": "string",  "payment": {    "id": "quo_4kT9mW2xQpL7vN3rB8sZ",    "object": "payment",    "status": "pending_deposit",    "coin": {      "asset_id": "string",      "symbol": "string",      "blockchain": "string",      "chain_name": "string",      "decimals": 0    },    "amount_in": "string",    "amount_in_base": "string",    "min_amount_in_base": "string",    "amount_in_usd": "string",    "deposit_address": "string",    "deposit_memo": "string",    "refund_address": "string",    "confidential": true,    "deadline": "2019-08-24T14:15:22Z",    "time_estimate_seconds": 0,    "deposited_amount": "string",    "refunded_amount": "string",    "refund_fee": "string",    "refund_reason": "string",    "origin_transactions": [      {        "hash": "string",        "url": "string"      }    ],    "destination_transactions": [      {        "hash": "string",        "url": "string"      }    ],    "correlation_id": "string",    "quote_signature": "string",    "created_at": "2019-08-24T14:15:22Z",    "state": "active",    "reported": true  },  "payments_delayed": true,  "email_receipts": true,  "receipt_email_set": true}