Skip to main content

Overview

The Inscripcion content type manages event registration submissions with integrated payment processing through Flow. It tracks participant information, payment status, and transaction details.
This is a collection type with draft and publish disabled. Registrations are created immediately and processed in real-time.

Schema Information

  • Collection Name: inscripcions
  • Singular: inscripcion
  • Plural: inscripcions
  • Draft & Publish: Disabled (immediate processing)

Attributes

nombreCompleto

nombreCompleto
string
Full name of the person registering.
  • Optional field
  • Free text format

rut

rut
string
Chilean national identification number (RUT).
  • Optional field
  • Format: XX.XXX.XXX-X
  • Should include verification digit

edad

edad
integer
Age of the participant.
  • Optional field
  • Numeric value
  • Used for category assignment

categoria

categoria
string
Race category for the participant.
  • Optional field
  • Free text format
  • Examples: “Infantil”, “Experto”, “Elite”, “Master A”

tipo

tipo
string
Registration type.
  • Optional field
  • Free text format
  • Examples: “Open”, “Federado”

email

email
email
Contact email address.
  • Email format validation
  • Optional field
  • Used for confirmation and communication

monto

monto
integer
Payment amount in Chilean pesos.
  • Optional field
  • Integer value (no decimals)
  • Example: 15000 for $15,000 CLP

tokenFlow

tokenFlow
string
Flow payment gateway token.
  • Optional field
  • Generated by Flow during payment initialization
  • Used to track payment session

estadoPago

estadoPago
enumeration
default:"Pendiente"
Current payment status.
  • Default: “Pendiente”
  • Allowed values:
    • Pendiente: Payment not yet completed
    • Pagado: Payment successful
    • Rechazado: Payment failed or rejected
  • Updated by payment webhook

ordenFlow

ordenFlow
string
Flow order number.
  • Optional field
  • Assigned by Flow after payment confirmation
  • Used for payment reconciliation

telefono

telefono
string
Contact phone number.
  • Optional field
  • Free text format
  • Example: “+56912345678”

API Endpoints

List All Registrations

curl -X GET 'https://api.example.com/api/inscripcions' \
  -H 'Authorization: Bearer YOUR_TOKEN'
data
array
Array of registration entries

Get Single Registration

curl -X GET 'https://api.example.com/api/inscripcions/1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Create Registration

curl -X POST 'https://api.example.com/api/inscripcions' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "nombreCompleto": "María González",
      "rut": "12.345.678-9",
      "edad": 28,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56912345678",
      "monto": 15000,
      "estadoPago": "Pendiente"
    }
  }'

Update Registration Status

curl -X PUT 'https://api.example.com/api/inscripcions/1' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "estadoPago": "Pagado",
      "ordenFlow": "ORD-123456"
    }
  }'

Delete Registration

curl -X DELETE 'https://api.example.com/api/inscripcions/1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Query Parameters

Filter by Payment Status

# Paid registrations only
curl -X GET 'https://api.example.com/api/inscripcions?filters[estadoPago][$eq]=Pagado' \
  -H 'Authorization: Bearer YOUR_TOKEN'

# Pending payments
curl -X GET 'https://api.example.com/api/inscripcions?filters[estadoPago][$eq]=Pendiente' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Filter by Category

curl -X GET 'https://api.example.com/api/inscripcions?filters[categoria][$eq]=Experto' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Filter by Type

curl -X GET 'https://api.example.com/api/inscripcions?filters[tipo][$eq]=Federado' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Sorting

# Sort by creation date (newest first)
curl -X GET 'https://api.example.com/api/inscripcions?sort=createdAt:desc' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Flow Payment Integration

Registration Flow

  1. Create Registration: Create an inscripcion record with estadoPago: "Pendiente"
  2. Initialize Payment: Call Flow API to get tokenFlow
  3. Update Registration: Store tokenFlow in the registration
  4. Redirect User: Send user to Flow payment page
  5. Webhook Callback: Flow sends payment result to your webhook
  6. Update Status: Update estadoPago to “Pagado” or “Rechazado”
  7. Store Order: Save ordenFlow for reconciliation
Always validate Flow webhook signatures to prevent fraudulent payment confirmations.

Example Response

{
  "data": {
    "id": 1,
    "attributes": {
      "nombreCompleto": "María González",
      "rut": "12.345.678-9",
      "edad": 28,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56912345678",
      "monto": 15000,
      "tokenFlow": "FLW-TKN-ABC123XYZ",
      "estadoPago": "Pagado",
      "ordenFlow": "ORD-123456",
      "createdAt": "2026-03-04T10:30:00.000Z",
      "updatedAt": "2026-03-04T10:35:00.000Z"
    }
  },
  "meta": {}
}

Payment Status Workflow

Best Practices

Validate RUT

Validate Chilean RUT format and verification digit on the client side before submission to prevent errors.

Email Confirmations

Send confirmation emails immediately after registration creation and after successful payment.

Payment Timeout

Set a timeout for pending payments (e.g., 30 minutes). Mark as “Rechazado” if not completed.

Secure Webhooks

Always verify Flow webhook signatures and use HTTPS endpoints for payment callbacks.

Audit Trail

Log all payment status changes with timestamps for troubleshooting and reconciliation.

Error Handling

Implement proper error handling for failed payments and provide clear user feedback.

Payment Reconciliation

Use ordenFlow to reconcile payments with Flow transaction records:
# Get all paid registrations for reconciliation
curl -X GET 'https://api.example.com/api/inscripcions?filters[estadoPago][$eq]=Pagado&fields[0]=ordenFlow&fields[1]=monto&fields[2]=email' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Store both tokenFlow (session) and ordenFlow (confirmation) for complete payment tracking.

Build docs developers (and LLMs) love