What the model is told
Add one line item to a draft Stripe invoice. Only works while the invoice is still a draft. The amount is in the smallest currency unit, so 2500 is 25.00 in GBP. Confirm the description and amount with the customer first. It returns the invoice item.
Request
POSThttps://api.stripe.com/v1/invoiceitems
Headers
AuthorizationBearer YOUR_STRIPE_SECRET_KEYContent-Typeapplication/x-www-form-urlencoded
Body
customer={{customerId}}&invoice={{invoiceId}}&amount={{amount}}¤cy={{currency}}&description={{description}}Parameters
customerId stringThe Stripe customer ID the invoice belongs to.invoiceId stringThe ID of the draft invoice.amount numberThe charge in the smallest currency unit, as a whole number.currency stringThree-letter lowercase ISO currency code.description stringWhat the charge is for.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "cade7530-440c-4bfb-a294-5f5cb2230ac0",
"type": "HTTP_REQUEST",
"label": "Add Stripe Invoice Line",
"name": "add_stripe_invoice_line",
"customName": false,
"description": "Add one line item to a draft Stripe invoice. Only works while the invoice is still a draft. The amount is in the smallest currency unit, so 2500 is 25.00 in GBP. Confirm the description and amount with the customer first. It returns the invoice item.",
"parameters": [
{
"name": "customerId",
"type": "string",
"description": "The Stripe customer ID the invoice belongs to."
},
{
"name": "invoiceId",
"type": "string",
"description": "The ID of the draft invoice."
},
{
"name": "amount",
"type": "number",
"description": "The charge in the smallest currency unit, as a whole number."
},
{
"name": "currency",
"type": "string",
"description": "Three-letter lowercase ISO currency code."
},
{
"name": "description",
"type": "string",
"description": "What the charge is for."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://api.stripe.com/v1/invoiceitems"
},
"headers": [
{
"name": "Authorization",
"value": "Bearer YOUR_STRIPE_SECRET_KEY"
},
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"body": "customer={{customerId}}&invoice={{invoiceId}}&amount={{amount}}¤cy={{currency}}&description={{description}}",
"timeout": null
}
}
}IDs are regenerated on every copy.