# Create Payment Link — Mamo Business

> Generate a vanilla or subscription payment link. See the documentation

- Key: `mamo_business-create-payment-link`
- Type: Action (Write)
- Version: 0.0.2
- App: Mamo Business (`mamo_business`) — https://pipedream.com/apps/mamo-business.md
- This page (HTML): https://pipedream.com/apps/mamo-business/actions/create-payment-link
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/mamo_business/actions/create-payment-link/create-payment-link.mjs

## Description

Generate a vanilla or subscription payment link. [See the documentation](https://mamopay.readme.io/reference/post_links)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `title` | `string` | Yes | The title of the payment link. |
| `description` | `string` | No | Payment description. This will appear on the payment checkout page. |
| `capacity` | `integer` | No | The capacity will be ignored when the subscription params exist and value will be null. |
| `active` | `boolean` | No | Whether the payment is active or not. |
| `returnUrl` | `string` | No | The URL which the customer will be redirected to after a successful payment. |
| `failureReturnUrl` | `string` | No | The URL which the customer will be redirected to after a failure payment. |
| `processingFeePercentage` | `integer` | No | The percentage of the transaction that is the fee. |
| `amount` | `string` | No | The value number of the payment. |
| `amountCurrency` | `string` | Yes | The currency that the transaction will be charged. |
| `isWidget` | `boolean` | No | Generate widget payment link. |
| `enableTabby` | `boolean` | No | Enables the ability for customers to buy now and pay later. |
| `enableMessage` | `boolean` | No | Enables the ability for customers to add a message during the checkout process. |
| `enableTips` | `boolean` | No | Enables the tips option. This will be displayed on the first screen. |
| `enableCustomerDetails` | `boolean` | No | Enables adding customer details such as the name, email, and phone number. This screen will be displayed before the payment details screen. |
| `enableQuantity` | `boolean` | No | Enable the payment link to be used multiple times. |
| `enableQrCode` | `boolean` | No | Adds the ability to verify a payment through a QR code. |
| `sendCustomerReceipt` | `boolean` | No | Enables the sending of customer receipts. |
| `firstName` | `string` | No | The first name of customer which will pre-populate in card info step. |
| `lastName` | `string` | No | The last name of customer which will pre-populate in card info step. |
| `email` | `string` | No | The email of customer which will pre-populate in card info step. |
| `externalId` | `string` | No | The external ID of your choice to associate with payments captured by this payment link. |
| `customData` | `object` | No | An object with custom data of the payment link. |
| `isRecurring` | `boolean` | Yes | Whether this payment link is for a recurring payment. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "mamo_business",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "mamo_business-create-payment-link",
  arguments: {
    title: "Title",
    description: "Description",
  },
})
```

**TypeScript**

```ts
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: "mamo_business-create-payment-link",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mamo_business: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    description: "Description",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "mamo_business-create-payment-link",
    "configured_props": {
      "mamo_business": { "authProvisionId": "apn_xxxxxxx" },
      "title": "Title",
      "description": "Description"
    }
  }'
```

---

- App: https://pipedream.com/apps/mamo-business.md · All apps: https://pipedream.com/apps
