with Modern Treasury and Checkout.com?
Modern Treasury is a powerful platform for payment operations, allowing businesses to manage payments, banking, and reconciliation easily. Through its API, you can initiate transfers, update transactions, reconcile accounts, and automate workflows related to financial transactions. Pipedream, as a serverless integration and compute platform, empowers you to connect Modern Treasury with countless other apps to create custom automation workflows, trigger actions based on payment events, and synchronize financial data across your business systems.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
modern_treasury: {
type: "app",
app: "modern_treasury",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.moderntreasury.com/api/api_keys/current`,
auth: {
username: `${this.modern_treasury.$auth.organization_id}`,
password: `${this.modern_treasury.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
checkout_com: {
type: "app",
app: "checkout_com",
}
},
async run({steps, $}) {
const timestamp = Date.now()
const data = {
"email": `test-${timestamp}@example.com`
}
return await axios($, {
method: "post",
url: `https://api.${this.checkout_com.$auth.authorization_server}/customers`,
headers: {
Authorization: `Bearer ${this.checkout_com.$auth.oauth_access_token}`,
"accept": `application/json`,
},
data,
})
},
})