View as Markdown
Xendit icon

Xendit ACTION

Create Invoice

Create a new invoice on Xendit platform See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Xendit account once, then configure and run Create Invoice from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "xendit-create-invoice",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xendit: { authProvisionId: "apn_xxxxxxx" },
    externalId: "External ID",
    amount: "Amount",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Invoice inputs
Property Type Description
externalId External ID string
ID of your choice (typically the unique identifier of an invoice in your system).
Required
amount Amount string
Amount on the invoice. Min and max amounts are stated here. The amount should be inclusive of any fees and or items that you may choose to include. If there is a difference between this amount and the sum of the price in the items parameters and or fees parameter, Xendit will refer to this amount parameter to create invoice. Do take note: if the currency or default currency is IDR and the amount includes decimals (e.g IDR 4550.50), the amount will be truncated to IDR 4550.
Required
description Description string
Description of invoice - you can use this field to list what items are being paid for, or anything else of your choice that describes the function of the invoice.
Optional
givenNames Given Names string
Given name of the customer
Optional
surname Surname string
Surname of the customer
Optional
email Email string
Email address of the customer
Optional
mobileNumber Mobile Number string
Mobile phone number of the customer in E164 format
Optional
addressCity City string
The city of the customer
Optional
addressCountry Country string
The country of the customer
Optional
addressPostalCode Postal Code string
The postal code of the customer
Optional
addressstate State string
The state of the customer
Optional
addressLine1 Address Line 1 string
The address line 1 of the customer
Optional
addressLine2 Address Line 2 string
The address line 2 of the customer
Optional
invoiceCreatedNotification Invoice Created Notification string[]
Specify which channel you want to notify your end customer through when you create a payment/invoice. If you do not specify values for this object, your end user will not be notified for this notification type.
Optional
invoiceReminderNotification Invoice Reminder Notification string[]
Specify which channel you want to notify your end customer through when you want to remind your customer to complete their payment. If you do not specify values for this object, your end user will not be notified for this notification type.
Optional
invoicePaidNotification Invoice Paid Notification string[]
Specify which channel you want to notify your end customer through when they have successfully completed payment. If you do not specify values for this object, your end user will not be notified for this notification type.
Optional
invoiceDuration Invoice Duration integer
Duration of time that the end customer is given to pay the invoice before expiration (in seconds, since creation). Default is 24 hours (86,400 seconds).
Optional
successRedirectUrl Success Redirect URL string
URL to redirect the customer to after successful payment.
Optional
failureRedirectUrl Failure Redirect URL string
URL to redirect the customer to after failed payment.
Optional
paymentMethods Payment Methods string[]
Specify the payment channels that you wish to be available on your Invoice.
Optional
currency Currency string
Currency of the amount that you created.
Optional
locale Locale string
The default language to display
Optional
items Items string[]
Array of items JSON objects describing the item(s) purchased. Max array size: 75. Mandatory for PayLater payment method. See the documentation for further details.
Optional
fees Fees string[]
Array of items JSON objects describing the fee(s) that you charge to your end customer. This can be an admin fee, logistics fee, etc. This amount will be included in the total invoice amount and will be transferred to your balance when the transaction settles. Max array size: 10. See the documentation for further details.
Optional
metadata Metadata object
An object containing any additional information you want to include with the invoice. This will be returned in the response and can be used for tracking or reporting purposes.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
xendit-create-invoice
Version
0.0.2
App
Xendit
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes