CartirraAPI
Get API keys

Create a payment link

posthttps://api.cartirra.com/v1/payment-links

Make a payment link for a cart.

Authentication
Secret key (Authorization: Bearer sk_…). How keys work
Permission
payment_links:manage

Request body required

JSON (Content-Type: application/json).

  • titlestringrequired

    Shown to you in the dashboard; the shopper sees the items

    Example Office party order

  • linesarray of LineDtorequired

    The cart, as in a checkout session (modifiers and images included)

  • success_urlstringnullable

    Example https://shop.example.com/thanks

  • store_idstring (uuid)nullable

    Fix the store. Otherwise the shopper picks one for pickup, dine-in or courier, and delivery comes from the cheapest open store that reaches the address

  • max_usesnumbernullable

    Paid orders it takes, then it stops; omit for no limit (1 for a one-off)

    Example 1

  • expires_atstring (date-time)nullable

Responses

201CreatedPaymentLinkResponse
  • idstringrequired

    Example plink_0193…

  • urlstringrequired

    Share this: WhatsApp, Instagram, SMS, email

    Example https://checkout.cartirra.com/l/Xb3…

  • titlestringrequired
  • statusstringrequired

    One of active, inactive

  • linesarray of objectrequired
  • items_totalMoneyResponserequired

    The items total (delivery, fees and taxes are added at checkout)

  • success_urlstringnullable
  • store_idstringnullable
  • max_usesnumbernullable
  • usesnumberrequired

    Orders paid through it

  • expires_atstringnullable
  • created_atstringrequired

Errors

Every error has the same body: { "error": { "code", "message", "details"?, "request_id" } }. See Errors for every code.

  • 400The request is malformed or a field is invalid (`VALIDATION_FAILED`).
  • 401Missing, malformed, revoked or expired API key (`UNAUTHENTICATED`), or a key this route does not accept, such as a public key (`CREDENTIAL_NOT_ACCEPTED`).
  • 403The key may not do this (`PERMISSION_DENIED`, `LIVE_MODE_NOT_ENABLED`, `PLAN_LIMIT_REACHED`, …).
  • 409The resource is in a state that does not allow this (for example `ORDER_NOT_CANCELLABLE`, `REFUND_NOT_ALLOWED`).
  • 422The request is valid but breaks a business rule.
  • 429Too many requests for this key (`RATE_LIMITED`); wait for `Retry-After` seconds.
  • 500Something went wrong on our side (`INTERNAL`). Safe to retry with the same `Idempotency-Key`.