---
agentTools:
  projectIndex: https://chimoney.readme.io/llms.txt
---

# Payout SPEI (Mexican bank transfer).

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Chimoney API Docs",
    "version": "0.2.4",
    "description": "This is the latest version of the Chimoney API. For deprecated version routes, please refer to /v0.2/api-docs."
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.chimoney.io/",
      "description": "Prod Server"
    },
    {
      "url": "https://api-v2-sandbox.chimoney.io",
      "description": "Sandbox API v2 (v0.2.4)"
    }
  ],
  "paths": {
    "/v0.2.4/payouts/spei": {
      "post": {
        "summary": "Payout SPEI (Mexican bank transfer).",
        "tags": [
          "Payouts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subAccount": {
                    "type": "string",
                    "description": "Subaccount (Wallet Account) to payout from, if any.",
                    "example": "1234567"
                  },
                  "turnOffNotification": {
                    "type": "boolean",
                    "description": "disables email and other notifications from Chimoney.",
                    "example": "false"
                  },
                  "debitCurrency": {
                    "type": "string",
                    "description": "Wallet Currency to debit from.",
                    "example": "MXN"
                  },
                  "speis": {
                    "type": "array",
                    "description": "SPEI Transactions.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "clabe": {
                          "type": "string",
                          "description": "CLABE number (18 digits) for the recipient. Use this for standard CLABE transfers.",
                          "example": "646180110400000007"
                        },
                        "phoneNum": {
                          "type": "string",
                          "description": "Phone number (10 digits) for the recipient. Alternative to clabe.",
                          "example": "5512345678"
                        },
                        "debitCard": {
                          "type": "string",
                          "description": "Debit card number (16 digits) for the recipient. Alternative to clabe or phoneNum.",
                          "example": "4152313541561234"
                        },
                        "beneficiary": {
                          "type": "string",
                          "description": "Full name of the beneficiary of the payment",
                          "example": "Juan Pérez"
                        },
                        "amount": {
                          "type": "number",
                          "description": "Payout value in specified currency. If debitCurrency is not MXN, we do an FX transaction.",
                          "example": 50
                        },
                        "institutionCode": {
                          "type": "string",
                          "description": "Institution code (required when using phoneNum or debitCard).",
                          "example": "40012"
                        },
                        "narration": {
                          "type": "string",
                          "description": "Narration/Description of payment to be included notification to user",
                          "example": "Monthly Payment"
                        },
                        "collectionPaymentIssueID": {
                          "type": "string",
                          "description": "issue ID for the payment payout initiated.",
                          "example": "1209992222"
                        }
                      },
                      "required": [
                        "beneficiary",
                        "amount"
                      ]
                    }
                  }
                },
                "required": [
                  "speis"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.",
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "description": "Message describing the outcome.",
                      "example": "Payout completed successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "paymentLink": {
                          "type": "string",
                          "example": "http://localhost:4000/pay/?issueID=63576330-b5f6-4279-9324-80633ce14710_11_1726571303087"
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "chimoneys": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "error": {
                          "type": "string",
                          "example": "none"
                        },
                        "payouts": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "responses": {
      "Forbidden": {
        "description": "Access to this resource is forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Forbidden"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Access to this resource is not available for unauthenticated users.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Unauthorized"
            }
          }
        }
      },
      "ServerError": {
        "description": "Indicates an internal server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ServerError"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation error in the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      }
    },
    "schemas": {
      "Forbidden": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating forbidden access.",
            "example": "API Access not enabled for account Test. Email support@chimoney.io"
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating unauthorized access.",
            "example": "API key is not defined. Generate a new one from the developer portal."
          }
        }
      },
      "ServerError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the error.",
            "example": "error"
          },
          "type": {
            "type": "string",
            "description": "Type of server error.",
            "example": "server error"
          },
          "code": {
            "type": "string",
            "description": "Specific error code for server issues.",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "message": {
            "type": "string",
            "description": "Detailed message explaining the issue.",
            "example": "An internal server error occurred."
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the validation error.",
            "example": "error"
          },
          "type": {
            "type": "string",
            "description": "Type of validation error.",
            "example": "Validation Error"
          },
          "code": {
            "type": "string",
            "description": "Error code indicating validation issue.",
            "example": "INVALID_REQUEST"
          },
          "message": {
            "type": "string",
            "description": "Detailed validation error message.",
            "example": "The request parameters are invalid."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Payouts",
      "description": "All payout operations."
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 208,
      "2": 243,
      "3": 240,
      "4": 73,
      "5": 214,
      "6": 34,
      "7": 0,
      "8": 37,
      "9": 190,
      "10": 200,
      "11": 166
    }
  }
}
```