Skip to main content

The best CoDi® API in the market

Create a CoDi charge with QR codes or push notifications, share it with your customer, and receive a webhook the moment the payment lands.

You send

POST https://api.pey.mx/codi/qr
Authorization: Bearer <api-key>

{
  "amount": 150,
  "concept": "Pedido #12345",
  "expiration": 600,
  "numRef": "12345"
}

You receive, once the customer pays

POST https://your-server.example/webhooks
webhook-signature: v1,…

{
  "amount": 150,
  "apiKeyId": "01M3QMMR6X9CBVDY1SF3G8QBJW",
  "codiQrId": "01HXYZQR1234567890ABCDEFGH",
  "concept": "Pedido #12345",
  "datePaid": 1790724818,
  "numRef": "12345",
  "transactionId": "01HXYZTXN1234567890RSTUVWX",
  "type": "codi.qr.payment_received"
}

We work with

CMRGrupo PresidenteOffice DepotSEDECO, Gobierno de la Ciudad de MéxicoEl Micky

Built around the bank account you already have

Connect the Mexican bank account your business already uses. To use our API, we do not ask you to open a new account.

Use any bank account

Link the bank account you already operate with and CoDi® payments settle directly in it. There is no account or wallet to open with pey; our technology is agnostic to the financial institution you use.

Add a payment account

API at no cost

For now, the API has no cost. No setup fee, no monthly plan and no charge per request. Create an API key in the portal, link your payment account and start generating CoDi® QR codes and push notifications right away.

Create your first QR

Two ways to get paid

Both run on the same API key and report back through the same webhook endpoint. Pick the one that fits your checkout, or use both.

Set up in three steps

  1. 1
    Create an API key

    Sign up on the test portal, add a payment account and create a key. Test keys never move real money.

  2. 2
    Configure CoDi for testing

    Prepare an Android device for testing CoDi payments for your API usage.

  3. 3
    Listen for webhooks

    Point an endpoint at pey and verify each delivery with Standard Webhooks.

Two environments

Build against test first. Test keys, portal and API all live on the dev subdomain and never touch real money.

EnvironmentAPIPortal
Testapi.dev.pey.mxportal.dev.mipey.mx
Liveapi.pey.mxportal.mipey.mx