Skip to main content
Monato supports SPEI as a redirect payment method in Mexico.

Setup

Monato does not provide self-service sandbox sign-up. Contact Monato to create your account and enable SPEI.

Credentials

When you configure Monato SPEI in the dashboard, provide the following credentials.
  • Client ID (client_id): Monato client ID.
  • Client Secret (client_secret): Monato client secret.
  • API Key (api_key): API key for Monato credential token access.
  • Approval URL (approval_url, optional): Custom URL for the approval experience when you pass connection_options.
If you do not provide approval_url, Gr4vy uses the hosted approval page.

Supported countries

Monato supports transactions from buyers in MX.

Supported currencies

Monato supports processing payments in MXN.

Integration

Monato SPEI uses a redirect flow.

Redirect integration

Create a transaction with the required fields.
var transaction = await client.Transactions.CreateAsync(
  transactionCreate: new TransactionCreate()
  {
    Amount = 1299,
    Currency = "MXN",
    Country = "MX",
    PaymentMethod =
      TransactionCreatePaymentMethod.CreateCheckoutSessionWithUrlPaymentMethodCreate(
        new RedirectPaymentMethodCreate()
        {
          Method = "spei",
          RedirectUrl = "https://example.com/callback",
        }
      ),
  }
);
After you create a transaction, the API response includes payment_method.approval_url and a processing status.
{
  "type": "transaction",
  "status": "processing",
  "payment_method": {
    "type": "payment-method",
    "approval_url": "https://..."
  },
  "method": "spei"
}
Use payment_method.approval_url to show the approval UI in a popup, iframe, or redirect. Approval links expire after 7 days.

Recurring payments

Monato SPEI supports payment method tokenization for recurring payments. To set up recurring payments:
  • Store the payment method during the first SPEI transaction by setting store: true.
  • Create subsequent charges with the stored payment_method.id and set is_subsequent_payment, merchant_initiated, and payment_source.
Use the following pattern for subsequent recurring charges.
var transaction = await client.Transactions.CreateAsync(
  transactionCreate: new TransactionCreate()
  {
    Amount = 1299,
    Currency = "MXN",
    Country = "MX",
    Intent = TransactionCreate.IntentEnum.Capture,
    PaymentMethod = TransactionCreatePaymentMethod.CreatePaymentMethodIdRequest(
      new PaymentMethodIdRequest()
      {
        Method = PaymentMethodIdRequest.MethodEnum.Id,
        Id = "f758d736-9a81-4bd0-85a9-2d3ee361b863"
      }
    ),
    IsSubsequentPayment = true,
    MerchantInitiated = true,
    PaymentSource = TransactionCreate.PaymentSourceEnum.Recurring
  }
);
Because this connector requires webhooks, confirm webhook delivery is active before you rely on recurring status updates.

Recurring caveats

When you implement recurring payments with Monato SPEI, keep these caveats in mind.
  1. For one-off transactions, payment_service_transaction_id is the CLABE value.
  2. For recurring transactions, payment_service_transaction_id is the CLABE plus the Gr4vy transaction ID. This combination gives each recurring transaction a unique value, because SPEI does not provide a stable unique transaction ID.
  3. Because of this format, Gr4vy can not automatically reconcile recurring webhooks from SPEI. You should proxy MONEY_IN events, find the matching transaction in Gr4vy, and then include transaction_id in the webhook body you send to Gr4vy.
Use the following payload pattern when you proxy MONEY_IN for recurring transactions.
{
  "id_msg": "a7a126e8-fa74-411c-ad2b-b000f277bb0d",
  "msg_name": "MONEY_IN",
  "msg_date": "2029-04-02",
  "body": {
    "id": "0196da9a-8947-703e-9a3b-bf8c7d9f6059",
    "beneficiary_account": "646180529600044117",
    "beneficiary_name": "John Smith",
    "beneficiary_rfc": "XYZ123456789",
    "payer_account": "137180210044008609",
    "payer_name": "Juan Perez",
    "payer_rfc": "XYZ987654321",
    "payer_institution": "40002",
    "amount": "123.00",
    "transaction_date": "20250402",
    "tracking_key": "50118609TBRNZ00I07219647",
    "payment_concept": "Payment for invoice 4567",
    "numeric_reference": "2504021",
    "transaction_id": "f0894971-7898-4c70-a10e-a7aa65d515b8"
  }
}

Webhooks

This connector requires webhooks. Contact Monato support to configure webhook delivery. Monato sends MONEY_IN when a payment is captured.

Testing

Contact Monato support and request a SPEI test transaction (MONEY_IN) using the CLABE from the payment session flow.