View as Markdown
Shopify  icon

Shopify ACTION

Create Gift Card

Creates a new gift card. To supply an optional customer, run Get Customers first to retrieve the customer GID. See the documentation.
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Shopify account once, then configure and run Create Gift Card 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: "shopify-create-gift-card",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    shopify: { authProvisionId: "apn_xxxxxxx" },
    initialValue: "Initial Value",
    code: "Code",
  },
})

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 Gift Card inputs
Property Type Description
initialValue Initial Value string
The initial monetary value of the gift card as a decimal string (e.g. 1000.00), in the store's currency.
Required
code Code string
Custom gift card code, 8-20 alphanumeric characters. If omitted, Shopify generates one automatically.
Optional
customerId Customer ID string
The identifier of a customer
Optional Dynamic
note Note string
Internal note about the gift card (e.g. Birthday gift card).
Optional
expiresOn Expires On string
Expiration date in YYYY-MM-DD format (e.g. 2026-12-31).
Optional
templateSuffix Template Suffix string
Liquid template suffix used to render the gift card.
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
shopify-create-gift-card
Version
0.0.5
App
Shopify
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes