Payhere, powered by Xendit, offers a powerful API that allows you to craft seamless payment experiences within your apps and websites. By leveraging this API on Pipedream, you can automate payment processing, synchronize transaction data with accounting systems, or trigger communication based on payment events. Pipedream's serverless platform enables the orchestration of Payhere with an array of other services to streamline financial operations, enhance customer engagement, and maintain robust financial records.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
payhere: {
type: "app",
app: "payhere",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.payhere.$auth.environment}.payhere.co/api/v1/user`,
headers: {
Authorization: `Bearer ${this.payhere.$auth.api_key}`,
},
})
},
})
Automated Receipt Generation: When a payment is successfully processed via Payhere, trigger a workflow on Pipedream to generate a digital receipt using a service like PDF.co. The workflow can then email the receipt to the customer automatically using an email service like SendGrid.
Real-Time Sales Dashboard Update: Create a Pipedream workflow that listens for new transactions from Payhere and updates a real-time dashboard on Google Sheets or Geckoboard. This allows for instantaneous monitoring of sales data, which can be particularly useful for flash sales or promotions.
Customer Support Ticket Creation: Use Pipedream to detect failed or disputed transactions from Payhere, automatically creating a support ticket in a customer service platform like Zendesk or Freshdesk. This workflow can help prioritize and streamline customer support responses to payment issues.
Payhere uses API keys for authentication. When you connect your Payhere account, Pipedream securely stores the keys so you can easily authenticate to Payhere APIs in both code and no-code steps.
You can find your API key in the integrations section of the merchants admin.
For environment
, Payhere provides a sandbox site so you can easily test your integration without using your own money. See docs. If you aren't testing, use the production option.