Developer guide

Connect your AI-built app

If your application was assembled with an AI builder — Base44 or any other tool — you can still take gourde payments, because the integration is three server-side calls and a webhook. This page is written to be pasted straight into your builder.

Server-side only

Every call that creates or confirms a payment runs on your server. The browser only ever sees a checkout URL.

Two secrets

A secret API key for calls, and a webhook signing secret for verifying events. Neither belongs in client code.

One description file

Hand the OpenAPI 3.1 document to your builder, or paste the prompt below. Both describe the same contract.

Copy-ready instructions

Integrate Ayiti API Connect (Haitian gourde payments) into this app.

Rules:
1. Never put the API secret key in frontend code, browser storage or a public repository.
2. Create the payment from a server-side function or backend route only.
3. To charge a customer: POST {API_BASE_URL}/payments with
   - Authorization: Bearer {AYITI_SECRET_KEY}
   - Idempotency-Key: a stable key per order attempt
   - body: amount_minor (integer centimes, HTG only), currency: "HTG",
     order_reference, description, website_id, return_url, cancel_url
4. Redirect the customer to the returned checkout_url.
5. Do NOT mark the order paid from the return URL. Fulfil only when:
   - a signed webhook (Ayiti-Signature, HMAC-SHA256 over "timestamp.body") says
     payment.succeeded, or
   - GET {API_BASE_URL}/payments/{payment_id} returns status "succeeded".
6. Confirm the amount and currency of the verified payment before fulfilling.

Secrets to ask the operator for:
  AYITI_API_BASE_URL   e.g. https://api.example.com/v1
  AYITI_SECRET_KEY     the merchant's secret key (sk_test_… or sk_live_…)
  AYITI_WEBHOOK_SECRET the signing secret of the webhook endpoint

Download the description

OpenAPI 3.1 with every endpoint, request schema, status transition, error code and webhook event, using your configured base URL.

Read it as documentation

What an AI builder must not do

  • Fulfil an order because a customer reached a success page.
  • Trust a payment status sent by the browser.
  • Put the secret key in a frontend file, environment-exposed variable or repository.
  • Retry a payment creation without the same idempotency key.

Which integrations exist today

Implemented and documented: the REST contract, the OpenAPI 3.1 description, the hosted checkout flow, signed webhooks and the WordPress/WooCommerce package. Not implemented: any claim of automatic, one-click integration with a named AI platform. Your builder writes the calls — the guide tells it exactly what to write.

WordPress package