Payments

Process Transaction

Process both payments and withdrawals through a single API call. This unified endpoint handles all transaction types based on the `operation_type` field.

POST
/process/

Authorization

Authorization
Authorization<token>

Tu API key con prefijo Token , p. ej. Token <API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/process/" \  -H "Content-Type: application/json" \  -d '{    "operation_type": "payment",    "amount": 150,    "currency": "MXN",    "customer": {      "name": "Ana María Rodríguez",      "email": "ana.rodriguez@email.com"    },    "payment_method": {      "type": "CARD",      "card_number": "9230-0892-4469-1474",      "cardholder_name": "c05d89b2-299c-4f93-b49a-42be00d3b64b",      "cvv": "d31f0da3-0ed3-4ad8-8b68-14c2669a99a7",      "expiration_month": "e401a32e-4174-424f-9688-727005f6a80e",      "expiration_year": "bd9ccc23-3d00-4109-9626-fc6581389063"    },    "client_reference": "order-789",    "return_url": "https://mystore.com/payment/return"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "operation_type": "payment",
  "status": "Pending",
  "amount": 0,
  "currency": "string",
  "client_reference": "string",
  "payment_id": 0,
  "transaction_id": "string",
  "provider": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "status_code": 0,
  "next_action": {
    "redirect_to_url": {
      "url": "http://example.com",
      "return_url": "http://example.com",
      "verify_transaction_status_url": "string"
    }
  },
  "payment_instructions": {
    "reference": "string",
    "account_number": "string",
    "bank_name": "string",
    "amount": 0,
    "expires_at": "2019-08-24T14:15:22Z",
    "reference_code": "string",
    "barcode": "string",
    "store_name": "string",
    "expiration_date": "2019-08-24T14:15:22Z",
    "instructions": [
      "string"
    ],
    "voucher_pdf": "http://example.com"
  }
}
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "operation_type": "payment",
  "status": "Pending",
  "amount": 0,
  "currency": "string",
  "client_reference": "string",
  "payment_id": 0,
  "transaction_id": "string",
  "provider": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "status_code": 0,
  "next_action": {
    "redirect_to_url": {
      "url": "http://example.com",
      "return_url": "http://example.com",
      "verify_transaction_status_url": "string"
    }
  },
  "payment_instructions": {
    "reference": "string",
    "account_number": "string",
    "bank_name": "string",
    "amount": 0,
    "expires_at": "2019-08-24T14:15:22Z",
    "reference_code": "string",
    "barcode": "string",
    "store_name": "string",
    "expiration_date": "2019-08-24T14:15:22Z",
    "instructions": [
      "string"
    ],
    "voucher_pdf": "http://example.com"
  }
}
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "operation_type": "payment",
  "status": "Pending",
  "amount": 0,
  "currency": "string",
  "client_reference": "string",
  "payment_id": 0,
  "transaction_id": "string",
  "provider": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "status_code": 0,
  "next_action": {
    "redirect_to_url": {
      "url": "http://example.com",
      "return_url": "http://example.com",
      "verify_transaction_status_url": "string"
    }
  },
  "payment_instructions": {
    "reference": "string",
    "account_number": "string",
    "bank_name": "string",
    "amount": 0,
    "expires_at": "2019-08-24T14:15:22Z",
    "reference_code": "string",
    "barcode": "string",
    "store_name": "string",
    "expiration_date": "2019-08-24T14:15:22Z",
    "instructions": [
      "string"
    ],
    "voucher_pdf": "http://example.com"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "request_error",
    "details": {}
  },
  "request_id": "string"
}

Examples by operation type

The example above is a tokenized card payment. The same endpoint covers the other two cases: change operation_type and the method-specific fields.

SPEI payment

{
  "operation_type": "payment",
  "amount": 500.00,
  "currency": "MXN",
  "customer": { "name": "Carlos Eduardo López", "email": "carlos.lopez@empresa.mx" },
  "payment_method": { "type": "SPEI" },
  "client_reference": "invoice-456"
}

The full flow — payment reference, expiry and reconciliation — is in APM payments.

SPEI withdrawal

{
  "operation_type": "withdrawal",
  "amount": 750.00,
  "currency": "MXN",
  "reference": "payout-001",
  "transfer_method": "SPEI",
  "description": "Commission payment",
  "beneficiary": {
    "account": "012345678901234567",
    "name": "Roberto Martínez García",
    "rfc": "MAGR850920XY1",
    "institution": "40012",
    "email": "roberto.martinez@email.com"
  }
}

Statuses, webhooks and declined-payout handling are in Withdrawals.

Was this page helpful?