With the Payhere API, you can build a variety of powerful and user-friendly payment solutions. Whether you are creating an online store, accepting donations, taking payments for services, or creating a membership system, the Payhere API allows you to securely handle payment solutions without having to worry about any of the technical complexities that come with implementing payments.
Payhere provides a host of useful features, like:
Below are a few examples of what you can build using the Payhere API:
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}`,
},
})
},
})
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.