Orders

Refresh an order checkout

Runs checkout again for an existing order: reuses its current session or opens a fresh one with the credits available now. Returns the order, or the paid order when nothing is left to pay.

post/teams/{slug}/orders/{order_id}/checkout/refresh

Request

  • Base URL: https://api.presscart.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.presscart.com/teams/{slug}/orders/{order_id}/checkout/refresh
  • Auth: HTTP bearer

Path parameters

slugstring required
Example:team-a
order_idstring uuid required
Example:0b0f4d0e-5a51-4a0a-9a39-3a5a4c1f2b6d

Request body

expired_session_idstring

The session a failed payment confirmation reported expired

intent'open' | 'return'

open when the checkout page is opened, which takes the credits from another order's open checkout; return (the default) when the customer comes back to an open checkout, which never takes them

page_idstring uuid

The checkout page load sending the refresh; the session it opens or reuses is then owned by that page

Example request

{
  "expired_session_id": "cs_test_a1b2c3d4e5f6g7h8i9j0",
  "intent": "open",
  "page_id": "8f2c1e4a-6b7d-4c3e-9a1f-2d5b8e0c7a64"
}

Response

The order with its current checkout session

idstring uuid required
profile_idstring uuid nullable required
client_idstring uuid nullable required
checkout_by_idstring uuid nullable required
team_idstring uuid nullable required
totalnumber nullable required
subtotalnumber nullable required
processing_feenumber nullable required
discountnumber nullable required
credits_appliednumber nullable required
couponstring nullable required
client_secretstring required
status'CREATED' | 'PAID' | 'CANCELLED' required
reference_numberstring nullable required
external_reference_numberstring nullable required
customer_invoice_idstring nullable required
customer_invoice_source'STRIPE' | 'BILL_COM' | 'WIRE' nullable required
customer_invoice_urlstring nullable required
is_guest_orderboolean required
guest_emailstring email nullable required
account_owner_emailstring email nullable required
guest_stripe_customer_idstring nullable required
checkout_session_idstring nullable required
payment_intent_idstring nullable required
payment_status'NOT_STARTED' | 'OPEN' | 'PROCESSING' | 'FAILED' | 'EXPIRED' | 'PAID' required
posthog_distinct_idstring nullable required
metadataobject nullable required

Example response

{
  "total": 121.09,
  "subtotal": 46.9,
  "processing_fee": 915.35,
  "discount": 12.79,
  "coupon": "AMAZING50",
  "client_secret": "cs_test_a1b2c3d4e5f6_secret_YvoWs3BcRC8REQSwuDDe8yg6b",
  "status": "CREATED",
  "reference_number": "PC12345678",
  "external_reference_number": "PC12345678",
  "customer_invoice_id": "INV-2024-001",
  "customer_invoice_source": "STRIPE",
  "customer_invoice_url": "https://invoice.stripe.com/i/acct_1234567/test_YWNjdF",
  "guest_email": "payer@example.com",
  "account_owner_email": "owner@example.com",
  "guest_stripe_customer_id": "cus_1234567890",
  "checkout_session_id": "cs_test_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "payment_intent_id": "pi_3PgV8XEA5tKCd21d27zsD8x",
  "payment_status": "NOT_STARTED",
  "metadata": {
    "some_field": "aegrus"
  }
}

Changes

No recorded changes to this operation across all 3 revisions of this API.