Skip to content
YasadDocs
Sign inGet started
Developer docs1 min read

Payments

Merchant setup, checkout, simulation and refunds.

Payments run through Stripe. In a practice workspace checkout is simulated.

  1. Connect the merchant (integrations key): POST /v1/payments/merchant with HTTPS return origins and a deposit in basis points (10000 = full payment, 2500 = 25%). Poll the returned operation and send the owner to the hosted onboarding link.
  2. Start checkout (operator or storefront): POST /v1/payments/checkout with the order ID and amount (deposit, full or remaining). Poll GET /v1/payments/operations/{id} until it's open and has a shopper URL.
  3. In practice mode, complete it with POST /v1/payments/simulate (paid or expired).
  4. Reconcile with POST /v1/payments/reconcile, then read the order's confirmed status.
  5. Refund with POST /v1/payments/refund and amountCents; omit it to refund the refundable balance.

Payments are recorded in a ledger (GET /v1/payments), with refunds as negative entries.

Type to search