# Check invoice amount upon applying the rate `POST https://api.leapa.co/v2/invoices/rates` Send your API key as a bearer token in the `Authorization` header. ## Request body Required. `application/json`. - `products` · _array of ItemRequest_ · **required** — List of product and quantity. Constraints: Not null, Not Empty - `quantity` · _integer_ · **required** — Quantity for this product. Constraints: Not null - `product_id` · _string_ · **required** — Product Identifications. Constraints: Not Null - `rate_ids` · _array of string_ — RateIds - `rate_id` · _string_ — Rate Id that can be used on this invoice. - `currency` · _string_ · **required** — Currency to be used on this invoice. Allowed values: `BIF`, `USD`, `KES`, `XAF` ```json { "products": [ { "quantity": 1, "product_id": "prd_84c2e7f019", "rate_ids": [] } ], "rate_id": "rat_20b6df3c9e", "currency": "BIF" } ``` ## Response 201 - `currency` · _string_ — Currency of the amount in the invoice. Allowed values: `BIF`, `USD`, `KES`, `XAF` - `amount_due` · _integer_ — amount upon applying the rate to be paid for this Invoice. - `rate_id` · _string_ — Rate Id that can be used on this invoice. ```json { "currency": "BIF", "amount_due": 45000, "rate_id": "rat_20b6df3c9e" } ``` ## Status codes - `201` Created - `400` Bad request - `401` Unauthorized - `402` Payment required - `403` Forbidden - `404` Not found - `428` Precondition required - `500` Server error ## Example ```bash curl -X POST "https://api.leapa.co/v2/invoices/rates" \ -H "Authorization: Bearer $LEAPA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "products": [ { "quantity": 1, "product_id": "prd_84c2e7f019", "rate_ids": [] } ], "rate_id": "rat_20b6df3c9e", "currency": "BIF" }' ``` --- _Generated from the Leapa documentation at leapa.co/docs._