Registrar cobro parcial
Developing
POST
/v1/collections/{id}/partial_payment
type=invoice
y collection_method=collect
.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.treli.co/v1/collections//partial_payment' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"amount": "string",
"create_collection_with_balance": true,
"days_until_due": 0,
"collection_rule_id": "string"
}'
Response Response Example
{
"id": "col_zdhBDP4k3JiRHNQ4RBUHyHgu",
"items": [
{
"id": "si_d7d2UrHwSG5A5YkYF7vfZmFf",
"name": "Nombre del producto",
"unit_price": "20000.00",
"quantity": 1,
"subtotal": "20000.00",
"total": "20000.00",
"product": {
"id": "prod_GYzZ5BXNRu6DxqQcEPJNoeCk",
"name": "Nombre del producto",
"description": "string",
"status": "active",
"product_merchant_id": null,
"product_invoicing_id": null,
"product_shopify_id": null,
"product_woocommerce_id": null,
"created_date": "2024-11-15 16:44:50",
"image": "http://example.com",
"is_test": false,
"invoice_settings": {
"invoice_tax_id": "12345",
"invoice_tax_percentage": "19"
}
},
"price": {
"id": "price_zUI6hNgEkX8sOLIUjnB9JpaQ",
"unit_price": "20000.00",
"pricing_model": "standard",
"currency": "COP",
"billing_period": "day",
"billing_interval": 1,
"type": "recurring",
"pricing_tiers": null,
"ntp_pricing": null,
"created_date": "2024-11-15 16:44:50",
"active": true,
"is_test": false,
"product_id": "prod_GYzZ5BXNRu6DxqQcEPJNoeCk"
}
}
],
"discounts": [
{
"id": "sd_aYbDFQaOd7TmBl0I58D5ax8l",
"code": "10OFF",
"amount": "10000.00",
"percent": "10.00"
}
],
"description": "Cobro de factura",
"subtotal": "string",
"total": "string",
"status": "pending",
"currency": "COP",
"created_date": "2024-11-15 16:44:50",
"paid_date": "2019-08-24T14:15:22Z",
"voided_at_date": "2019-08-24T14:15:22Z",
"due_date": "2019-08-24T14:15:22Z",
"collection_method": "charge",
"collection_rule_id": "string",
"type": "invoice",
"is_test": false,
"tag": "string",
"source": "string",
"meta_data": {},
"payment_settings": null,
"invoice_settings": {
"invoice_document_id": "string",
"invoice_cost_center": "string"
},
"invoice_retentions": {
"reteica": "string",
"retefte": "string"
},
"collection_attempts": 0,
"collecting": true,
"next_collection_attempt_date": "2019-08-24T14:15:22Z",
"payment_method_gateway": "string",
"payment_method_type": "string",
"paid_out_of_band": true,
"out_of_band_proof": "http://example.com",
"customer": "string",
"billing_address": {
"address_1": "string",
"address_2": null,
"city": "string",
"state": "string",
"postcode": null,
"country": "string"
},
"subscription": "string",
"invoice": "string",
"invoice_number": "string",
"checkout_url": "string"
}
Request
Path Params
id
string
required
Body Params application/json