4. Crear una Orden (Order)
Una orden es una solicitud formal para ejecutar una transacción financiera basada en un quote previamente generado. Una vez que se acepta la cotización, se utiliza para crear una orden real con todos los detalles del remitente y del beneficiario.
Body Request para Crear una Orden
Para crear una orden, se debe proporcionar el siguiente body request con la información detallada del remitente y del beneficiario:
{
"pogQuotationId": 90,
"externalId": "fdsf",
"senderNames": "Alice",
"senderLastNames": "Brown",
"senderEmail": "alicebrown@example.com",
"senderPhone": "+13456789012",
"senderDocumentId": "123456789",
"senderDocumentType": "cc",
"senderCountry": "CO",
"sourceCountry": "CO",
"beneficiaryNames": "test",
"beneficiaryLastNames": "test",
"beneficiaryEmail": "test@example.com",
"beneficiaryPhone": "+13000000000",
"beneficiaryDocumentId": "12345678",
"beneficiaryDocumentType": "cc",
"paymentInstructions": {
"bankName": "BANCOLOMBIA_CO",
"accountNumber": "123",
"phoneNumber": "3005556666"
},
"paymentPurpose": "Ayuda Familiar"
}
Descripción de los Campos
- pogQuotationId: Identificador del quote utilizado para esta orden.
- externalId: Un identificador opcional que permite al cliente rastrear la orden desde su sistema.
- senderNames y senderLastNames: Nombres y apellidos del remitente.
- senderEmail: Correo electrónico del remitente.
- senderPhone: Número de teléfono del remitente.
- senderDocumentId y senderDocumentType: Documento de identificación y tipo del remitente.
- senderCountry: País de origen del remitente.
- sourceCountry: País de origen de los fondos.
- beneficiaryNames y beneficiaryLastNames: Nombres y apellidos del beneficiario.
- beneficiaryEmail: Correo electrónico del beneficiario.
- beneficiaryPhone: Número de teléfono del beneficiario.
- beneficiaryDocumentId y beneficiaryDocumentType: Documento de identificación y tipo del beneficiario.
- paymentInstructions: Instrucciones de pago que incluyen detalles como el nombre del banco, número de cuenta y teléfono asociado al beneficiario. Puede ver qué campos enviar según el método de dispersión en PaymentInstructions o por país en Métodos de Dispersión por País.
- paymentPurpose: Motivo de envio de la remesa
Respuesta del Endpoint
La respuesta del endpoint de creación de la orden proporciona un objeto JSON con información detallada sobre el estado y los detalles de la transacción creada. Aquí está un ejemplo de la respuesta completa:
{
"appliedCeiling": 4000000,
"appliedFloor": 4000,
"beneficiaryDocumentId": "12345678",
"beneficiaryDocumentType": "cc",
"beneficiaryLastNames": "test",
"beneficiaryNames": "test",
"calculatedFlatFee": 0,
"calculatedPercentageFee": 0,
"createdTime": "2024-09-25T02:09:28.011Z",
"currency": "VES",
"externalId": "fdsf",
"financialEntity": null,
"id": 17065,
"paymentInstructions": {
"bankName": "BANCOLOMBIA_CO",
"accountNumber": "123",
"phoneNumber": "3005556666"
},
"payoutType": null,
"providerAmount": 1000,
"providerReferenceId": null,
"providerExternalId": null,
"status": "CREATED",
"subStatus": null,
"sumFee": 0,
"taxFee": 0,
"totalFee": 0,
"updatedTime": "2024-09-25T02:09:28.011Z",
"payoutOrderBackendId": "29064067-873b-425f-94ea-86bea91633c6",
"payoutTypeBackendId": "893885fd-80b1-44a7-8b04-58bfe3d43c53",
"entityBackendId": "bc8c7363-6e23-4747-a309-be539771d752",
"beneficiaryFirstName": null,
"beneficiaryMiddleName": null,
"beneficiaryLastName": null,
"beneficiarySecondLastName": null,
"beneficiaryDocumentIdCountry": null,
"beneficiaryNationality": null,
"beneficiaryCountryOfBirth": null,
"beneficiaryGender": null,
"beneficiaryAddress": null,
"beneficiaryZipCode": null,
"beneficiaryCity": null,
"beneficiaryLocality": null,
"beneficiaryCountry": null,
"beneficiaryEmail": null,
"beneficiaryState": null,
"beneficiaryOccupation": null,
"paymentPurpose": "Ayuda Familiar",
"senderNames": "Alice",
"senderLastNames": "Brown",
"senderDocumentId": "123456789",
"senderDocumentType": "cc",
"senderPhone": "+13456789012",
"senderAddress": null,
"senderCountry": "CO",
"senderState": null,
"senderCity": null,
"senderEmail": "alicebrown@example.com",
"senderBirthDate": null,
"sfid": null,
"isEmpty": false,
"internalReferenceId": null,
"sourceCountry": null,
"b2bClientBackendId": "4b577b92-57e2-42f9-b2b4-820cb66fde20",
"quotationBackendId": "b0d9cdcb-5b43-4e0d-84c2-aeb27e62b319",
"quotation": {
"id": "90",
"quotationBackendId": "b0d9cdcb-5b43-4e0d-84c2-aeb27e62b319",
"rateId": 66,
"b2bClientId": 70,
"sourceAmount": 1000,
"targetAmount": 38148.216,
"convertAmount": 1000,
"value": 39.2,
"pricingRules": [
{
"backendId": "912a2a54-4280-46b7-a2e5-524b94a3d1b0",
"pricingRule": "FX_SPREAD_FEE",
"pricingType": "FEE",
"appliedValue": 0.02,
"pricingLabel": "Comisión en tasa",
"calculationMethod": "HIDDEN_IN_RATE"
},
{
"backendId": "1ee34169-2d53-41e2-9542-2c5c295de519",
"pricingRule": "PAYOUT_TYPE_FEE",
"pricingType": "FEE",
"appliedValue": 1051,
"pricingLabel": "Costo de servicio",
"calculationMethod": "VISIBLE"
}
],
"createdTime": "2024-09-25T01:59:28.326Z",
"updatedTime": "2024-09-25T01:59:28.326Z"
}
}