Skip to content
FreeTicketDocs
Esc
↑↓navigate↵open⌘Jpreview

Open a PSE payment through MercadoPago (redirect)

Requires the X-Customer-Session header. The enterprise service API key is OPTIONAL (with a key, results are additionally scoped to the workspace pinned to it). Creates a MercadoPago preference restricted to PSE and returns redirectUrl (init_point): the landing page must REDIRECT the browser there, not mount it in an iframe. The buyer picks their bank and confirms the transfer inside MercadoPago; on return, they land on GET /api/mp/return (our domain), which issues a 302 to the returnUrl sent in POST /customer/orders — the landing page must call GET /customer/orders/{id} for the authoritative status, never infer it from the return URL. The sale is confirmed by webhook when the bank settles the payment (asynchronous: it may take a while). Responds 409 with code PAYMENT_UNAVAILABLE if the reservation expired, the sale is no longer pending, a payment attempt is in flight with another gateway, or the event only charges through Bold. The sale must belong to the session’s buyer (and, with a key, to the workspace pinned to it): anything else is 404. {id} accepts the sale id or its reference. Limited to 10 opens per minute per buyer (429 with Retry-After).

POST/customer/orders/{id}/payment/pse
Authorization
AuthorizationAPI key · headerrequired

API key prefixed with Bearer . Alternative: the x-api-key header with the raw key. Available scopes: read and write (see /.well-known/oauth-protected-resource).

or
x-api-keyAPI key · headerrequired

Raw API key (without Bearer ), alternative to Authorization.

Path parameters
idstringrequired
Header parameters
X-Workspace-Idstring

Active workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).

X-Purchase-Sessionstring

Purchase session id (POST /customer/purchase-sessions). Required when the event's workspace enforces a single purchase session; if present, it is always validated. The requirement is decided by the EVENT, not the API key: it applies if the owning workspace, a linked artist or a catalog seller of the show has the flag, with or without a key. Rejections (409; uppercase error.code and the slug in error.details.reason): PURCHASE_SESSION_REQUIRED (missing, or belongs to another buyer or another event date), PURCHASE_SESSION_SUPERSEDED (another tab or device replaced it), PURCHASE_SESSION_EXPIRED (the map clock ran out before the order was created), PURCHASE_SESSION_BUSY (an order is already in flight with this session) and, on POST /customer/orders with seats, HOLD_TOKEN_MISMATCH (the holdToken is not the session's, or belongs to a replaced session or another buyer even if the header is absent). Payment POSTs accept the buyer's live session or the session that created THAT order, as long as no other session has been opened since. Rejecting a new payment NEVER affects a payment already in flight.

Responses
200

OK

dataCustomerOrderMercadoPagoPserequired
Show properties
redirectUrlstringrequired

init_point of the MercadoPago preference. Redirect the buyer there (it is not an iframe): they pick their bank and confirm the transfer on MercadoPago.

401

Missing or invalid credential.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
403

Insufficient role or resource not accessible.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
404

Resource does not exist or is out of scope.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
409

Conflict: the resource does not allow this operation in its current state.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
422

Request body/parameter validation failed.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
429

Too many requests: rate limit exceeded.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsany
Try it
Server
Authorization
Parameters
Request
curl -X POST 'https://admin.appfreeticket.com/api/v1/customer/orders/string/payment/pse' \
  -H 'Authorization: YOUR_API_KEY'
Response
{
  "data": {
    "redirectUrl": "string"
  }
}