Pay the existing letter with a shared payment token. An empty body reconciles a pending payment or requests an MPP challenge; use Payment-Authorization for its credential.

post/v1/letters/{id}/checkout

Request

  • Base URL: https://paperagent.dev
  • URL: https://paperagent.dev/v1/letters/{id}/checkout
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://paperagent.dev/oauth/authorize, token URL https://paperagent.dev/oauth/token, scopes: letters:write)
    • API key in header X-Api-Key
    • HTTP bearer

Path parameters

idstring required

Headers

Payment-Authorizationstring

MPP Payment credential containing the approved shared payment token. Preserve your OAuth/API-key authentication.

Request body

shared_payment_tokenstring

Response

The existing order is paid, including an idempotent replay.

order_idstring required
letter_idstring nullable required
order_status'pending' | 'awaiting_payment' | 'paid' | 'failed' | 'refunded' | 'disputed' | 'abandoned' required

paid means the money moved and the letter is released to print.

payment_intent_idstring nullable required

The payment record at the provider, for the user’s receipt questions.

already_paidboolean required

True when this order was already paid, so this call charged nothing.

messagestring required

What to tell the user. Read it before answering.

Changes

No recorded changes to this operation across all 1 revision of this API.