POST api/Payment

Realizar un pago parcial o total a un CFDI

Request Information

URI Parameters

None.

Body Parameters

Layout con información para el pago de un CFDI

PaymentModelApi
NameDescriptionTypeAdditional information
DocumentId

Identificador único del documento

globally unique identifier

Required

PaymentAmount

Cantidad a pagar

decimal number

Required

PaymentMethod

Método de pago utilizado

PaymentMethod

Required

PaymentDate

Fecha de pago

date

Required

Data type: DateTime

Comments

Comentarios sobre el pago

string

Required

Max length: 1999

ExternalPaymentId

Identificador externo del pago

string

None.

FileName

Nombre del archivo del comprobante de pago (mismo para el xml y pdf)

string

None.

XML

XML del REP

string

None.

PaymentInfo

Información adicional del pago

PaymentConfigModelApi

None.

Metadata

Metadatos (json)

string

None.

Documents

Lista de documentos para pagos multiples

Collection of PaymentDocumentModelApi

None.

Request Formats

application/json, text/json

Sample:
{
  "DocumentId": "08dd2e4a-4005-d7ff-ba1f-9f1e94b2becc",
  "PaymentAmount": 2.0,
  "PaymentMethod": 1,
  "PaymentDate": "2025-01-06T06:04:19.3060863-06:00",
  "Comments": "sample string 4",
  "ExternalPaymentId": "sample string 5",
  "FileName": "sample string 6",
  "XML": "sample string 7",
  "PaymentInfo": {
    "OperationNumber": "sample string 1",
    "TaxIdSourceAccount": "sample string 2",
    "SourceAccount": "sample string 3",
    "TaxIdTargetAccount": "sample string 4",
    "TargetAccount": "sample string 5",
    "PaymentTypeid": "sample string 6",
    "ForeignBankName": "sample string 7",
    "CadPAgo": "sample string 8",
    "CertPago": "sample string 9",
    "SelloPago": "sample string 10",
    "PaymentType": "sample string 11"
  },
  "Metadata": "sample string 8",
  "Documents": [
    {
      "DocumentId": "08dd2e4a-4005-d7ff-ba1f-9f1e94b2becd",
      "Amount": 2.0
    },
    {
      "DocumentId": "08dd2e4a-4005-d7ff-ba1f-9f1e94b2becd",
      "Amount": 2.0
    }
  ]
}

application/xml, text/xml

Sample:
<PaymentModelApi xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <DocumentId>08dd2e4a-4005-d7ff-ba1f-9f1e94b2becc</DocumentId>
  <PaymentAmount>2</PaymentAmount>
  <PaymentMethod>Cash</PaymentMethod>
  <PaymentDate>2025-01-06T06:04:19.3060863-06:00</PaymentDate>
  <Comments>sample string 4</Comments>
  <ExternalPaymentId>sample string 5</ExternalPaymentId>
  <FileName>sample string 6</FileName>
  <XML>sample string 7</XML>
  <PaymentConfig>
    <OperationNumber>sample string 1</OperationNumber>
    <TaxIdSourceAccount>sample string 2</TaxIdSourceAccount>
    <SourceAccount>sample string 3</SourceAccount>
    <TaxIdTargetAccount>sample string 4</TaxIdTargetAccount>
    <TargetAccount>sample string 5</TargetAccount>
    <PaymentTypeid>sample string 6</PaymentTypeid>
    <ForeignBankName>sample string 7</ForeignBankName>
    <CadPAgo>sample string 8</CadPAgo>
    <CertPago>sample string 9</CertPago>
    <SelloPago>sample string 10</SelloPago>
    <PaymentType>sample string 11</PaymentType>
  </PaymentConfig>
  <Metadata>sample string 8</Metadata>
  <Documents>
    <PaymentDocumentModelApi>
      <DocumentId>08dd2e4a-4005-d7ff-ba1f-9f1e94b2becd</DocumentId>
      <Amount>2</Amount>
    </PaymentDocumentModelApi>
    <PaymentDocumentModelApi>
      <DocumentId>08dd2e4a-4005-d7ff-ba1f-9f1e94b2becd</DocumentId>
      <Amount>2</Amount>
    </PaymentDocumentModelApi>
  </Documents>
</PaymentModelApi>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'PaymentModelApi'.

Response Information

Resource Description

El resultado de la solicitud será el UUID de integración resultante y un código HTTP 200 Ok

ResponseModelApiOfPaymentResponseModelApi
NameDescriptionTypeAdditional information
success

Indica si la solicitud se procesó de manera satisfactoria

boolean

None.

message

Mensaje de la solicitud

string

None.

messageDetail

Lista de mensajes

Collection of string

None.

failureCode

Código de error en caso de existir

string

None.

data

Layout de respuesta de la solicitud

PaymentResponseModelApi

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "message": "sample string 2",
  "messageDetail": [
    "sample string 1",
    "sample string 2"
  ],
  "failureCode": "sample string 3",
  "data": {
    "PaymentId": "08dd2e4a-4005-d7ff-ba1f-9f1e94b2bece"
  }
}

application/xml, text/xml

Sample:
<ResponseModelApiOfPaymentResponseModelApi xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <success>true</success>
  <message>sample string 2</message>
  <messageDetail>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </messageDetail>
  <failureCode>sample string 3</failureCode>
  <data>
    <PaymentId>08dd2e4a-4005-d7ff-ba1f-9f1e94b2bece</PaymentId>
  </data>
</ResponseModelApiOfPaymentResponseModelApi>