CasaPay Gateway#

The CasaPay Gateway is a hosted checkout for rental payments. You create a session from your backend, redirect the tenant to the returned gateway_url, and CasaPay handles identity verification, the deposit decision, and the card or bank payment. You get the result on a webhook.

curl -X POST https://manage.casapay.com/api/v1/gateway/sessions \
  -H 'Authorization: Bearer sk_live_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "tenant": {
      "email": "tenant@example.com",
      "first_name": "Mari",
      "last_name": "Tamm"
    },
    "agreement_type": "ontime",
    "cover_amount": 800,
    "deposit_mode": "choice",
    "first_payment_amount": 650,
    "currency": "EUR",
    "success_url": "https://your-app.com/done",
    "cancel_url": "https://your-app.com/cancelled"
  }'

What you can build#

Use caseAgreement typeNotes
Collect a one-off payment or invoicepayment_linkNo guarantee, no deposit.
First month rent + deposit at move-inontime or coverDeposit paid in cash or guaranteed by CasaPay.
Recurring rent on an existing tenantontime or coverReuse the agreement, create follow-up invoices.

Core objects#

  • Session - one checkout attempt. Identified by a gwy_-prefixed session_id. Carries the amounts, the steps the tenant must complete, and the final payment state.
  • Payment agreement - the durable link between a tenant and your entity. Created automatically by the first session, or up front via the agreements endpoint. Has a numeric id and an email_alias.
  • Invoice - a payable amount attached to an agreement. Created per session, per follow-up invoice, or by emailing a PDF to the agreement alias.

How a payment flows#

  1. You create a session and redirect the tenant to gateway_url.
  2. The tenant completes any required steps - identity verification, deposit choice - then pays by card or bank link.
  3. CasaPay books the invoice, marks it paid, and schedules the payout to your bank account.
  4. You receive a gateway.session.completed webhook.

Read Checkout flow for the full sequence, or jump to the Quickstart.

Base URLs#

EnvironmentBase URL
Livehttps://manage.casapay.com
Sandboxhttps://manage.test.casapay.com

All gateway endpoints are prefixed with /api/v1/gateway.

Test mode

Sandbox sessions expose a payment simulator instead of a real card form, so you can drive success, decline and timeout outcomes deterministically. See Testing.