Actions / Events

This document provides comprehensive implementation requirements for building workflow integrations (Zapier, Make.com, n8n, etc.) with Shuttle Payment Links. It details the exact fields that need to be exposed to users and how they map to our API.

Understanding This Document

Document Structure

Each endpoint section is organized into three parts:

  1. Endpoint Overview - Basic information about the endpoint including the HTTP method and API path
  2. Input Fields - Fields that users configure in the workflow platform
  3. Output Fields - Data returned to users after the API call

Interpreting Input Fields

Input fields represent the user-facing interface in your workflow platform. Each input field entry contains:

  • Display Name: The name of the field as it should appear in the workflow platform
  • Field ID: The exact field name to expose in your UI (e.g., payment_link__amount)
  • Type: The data type (string, boolean, number, etc.)
  • Required: Whether the field must be provided
  • API Mapping: How this field maps to the Shuttle API request structure
  • Description: User-friendly description for the field including any special handling instructions, validation rules, or conversion requirements

Interpreting Output Fields

Output fields represent the data returned from the API that should be made available to subsequent workflow steps. Each output field entry contains:

  • Display Name: The field name as it should appear in the workflow platform
  • Field ID: The exact field name to expose in your UI (e.g., payment_link__amount)
  • Source Path: The JSON path in the API response where this data comes from
  • Type: The data type of the field
  • Description: What this field represents including any transformation or special handling required

Implementation Guidelines

Auto-fill Text Feature

The auto_fill_text field allows natural language input that automatically populates other fields. Fields containing the word "auto" (except state parameters) will be filled based on this text. Use auto:default_value syntax to set defaults.

Expiry Date Handling

Payment links support two methods for setting expiration:

  • Direct datetime: expires field accepts ISO 8601 datetime
  • Relative seconds: expires_in field accepts seconds from now

When implementing expires_in, convert to ISO datetime:

const expiresDate = new Date(Date.now() + (expires_in * 1000)).toISOString();

State Fields

State fields (state1 through state9) allow users to attach custom data to payment links. This data is returned unchanged in webhooks and redirect URLs, enabling workflow tracking and correlation.

Field Validation

  • Currency must be a valid 3-letter ISO code (USD, EUR, GBP, etc.)
  • Amounts must be in decimal format (e.g., "29.99", not "2999" cents)
  • URLs must be valid and use HTTPS protocol
  • Email addresses must be properly formatted

Data Type Conversion

Ensure proper type conversion throughout your implementation:

  • Boolean fields: Use true/false values, not string representations
  • Decimal amounts: Use string format (e.g., "29.99"), not integers in cents
  • Datetime fields: Use ISO 8601 format for all date/time values

Field Naming Convention

The double underscore (__) convention helps users understand the data hierarchy and prevents naming conflicts in workflow platforms. If your platform does not support double underscores, single underscores are acceptable.

Error Handling

All endpoints should properly handle and expose error responses including:

  • Validation errors (400)
  • Authentication failures (401)
  • Resource not found errors (404)
  • Server errors (500)

Action: Create Payment Link

Endpoint: POST /c/api/instances/{instance_key}/payment_links

Creates a new shareable payment link that customers can use to make payments.

Input Fields

Display NameField IDTypeAPI MappingDescription
Auto-Fill Textpayment_link__auto_fill_textstringpayment_link.auto_fill_textNatural language text to auto-populate fields. Auto-populates fields containing 'auto' (except state params). Use 'auto:default_value' syntax for defaults
Currencypayment_link__currencystringpayment_link.options.currency(Required) 3-letter currency code. Must be valid ISO code (USD, EUR, GBP, etc.) matching gateway-supported currency
Amountpayment_link__amountstringpayment_link.options.amountPayment amount in decimal format (e.g., "29.99", "1000.00"), not cents
Referencepayment_link__alt_keystringpayment_link.options.alt_keyYour reference to track payment in your system (e.g., ORDER_1234, INV_567)
Customer CRM Keypayment_link__account_crm_keystringpayment_link.options.account.crm_keyYour unique CRM identifier to link payment to existing customer
Customer First Namepayment_link__account_first_namestringpayment_link.options.account.first_nameCustomer first name
Customer Last Namepayment_link__account_last_namestringpayment_link.options.account.last_nameCustomer last name
Customer Emailpayment_link__account_emailstringpayment_link.options.account.emailCustomer email address. Must be valid email format
Customer Phonepayment_link__account_phonestringpayment_link.options.account.phoneCustomer phone number
Save Cardpayment_link__save_cardbooleanpayment_link.options.save_cardSave payment method. true = always save, false = never save, unset = user choice
Skip Receiptpayment_link__skip_receiptbooleanpayment_link.options.skip_receiptSkip receipt page and redirect immediately if true. Default: false
Page Success Messagepayment_link__page_success_messagestringpayment_link.options.page_success_messageMessage shown when payment succeeds and no success_url provided
Page Pending Messagepayment_link__page_pending_messagestringpayment_link.options.page_pending_messageMessage shown when payment pending and no pending_url provided
Success URLpayment_link__success_urlstringpayment_link.options.success_urlSuccess redirect URL. HTTPS required. Query params added: payment_link, status, contract, charge, transaction, payment_method, account
Pending URLpayment_link__pending_urlstringpayment_link.options.pending_urlPending redirect URL. HTTPS required. Used when payment needs authorization
Page Namepayment_link__namestringpayment_link.options.nameName of the page to display in the payment link
Page Intropayment_link__page_introstringpayment_link.options.page_introIntroductory text to display on the payment page
Expires Atpayment_link__expiresstringpayment_link.expiresExpiry datetime in ISO 8601 format. Must be future date/time
Expires Inpayment_link__expires_innumberConvert to payment_link.expiresSeconds until expiry. Convert to ISO datetime: new Date(Date.now() + (expires_in * 1000)).toISOString()
State 1state1stringpayment_link.state.state1Custom state field 1 - data returned unchanged in webhooks/redirects
State 2state2stringpayment_link.state.state2Custom state field 2 - data returned unchanged in webhooks/redirects
State 3state3stringpayment_link.state.state3Custom state field 3 - data returned unchanged in webhooks/redirects
State 4state4stringpayment_link.state.state4Custom state field 4 - data returned unchanged in webhooks/redirects
State 5state5stringpayment_link.state.state5Custom state field 5 - data returned unchanged in webhooks/redirects
State 6state6stringpayment_link.state.state6Custom state field 6 - data returned unchanged in webhooks/redirects
State 7state7stringpayment_link.state.state7Custom state field 7 - data returned unchanged in webhooks/redirects
State 8state8stringpayment_link.state.state8Custom state field 8 - data returned unchanged in webhooks/redirects
State 9state9stringpayment_link.state.state9Custom state field 9 - data returned unchanged in webhooks/redirects

Output Fields

Display NameField IDSource PathTypeDescription
Payment Link IDpayment_link__idpayment_link.idstringUnique payment link identifier (format: pl_1234_abcdef)
Payment Link URLpayment_link__urlpayment_link.urlstringShareable payment link URL to send to customers
Expires Atpayment_link__expirespayment_link.expiresstringISO 8601 expiry datetime when link becomes invalid

Action: Update Payment Link

Endpoint: PUT /c/api/instances/{instance_key}/payment_links/{payment_link_id}

Updates an existing payment link. All fields are optional - only provided fields will be updated.

Input Fields

Display NameField IDTypeAPI MappingDescription
Payment Link IDpayment_link__idstringURL parameter(Required) ID of payment link to update (format: pl_1234_abcdef)
ModemodestringmodeUpdate mode: PATCH or REPLACE (default). PATCH updates specified fields, REPLACE replaces entire object
Currencypayment_link__currencystringpayment_link.options.currency3-letter currency code. Cannot change after payments made
Amountpayment_link__amountstringpayment_link.options.amountPayment amount in decimal format (e.g., "29.99", "1000.00")
Referencepayment_link__alt_keystringpayment_link.options.alt_keyYour reference to track this payment
Customer CRM Keypayment_link__account_crm_keystringpayment_link.options.account.crm_keyYour CRM identifier for customer
Customer First Namepayment_link__account_first_namestringpayment_link.options.account.first_nameCustomer's first name
Customer Last Namepayment_link__account_last_namestringpayment_link.options.account.last_nameCustomer's last name
Customer Emailpayment_link__account_emailstringpayment_link.options.account.emailCustomer's email address. Must be valid email format
Customer Phonepayment_link__account_phonestringpayment_link.options.account.phoneCustomer's phone number
Save Cardpayment_link__save_cardbooleanpayment_link.options.save_cardControl payment method saving
Skip Receiptpayment_link__skip_receiptbooleanpayment_link.options.skip_receiptSkip receipt page and redirect immediately
Page Success Messagepayment_link__page_success_messagestringpayment_link.options.page_success_messageMessage shown when payment succeeds
Page Pending Messagepayment_link__page_pending_messagestringpayment_link.options.page_pending_messageMessage shown when payment is pending
Success URLpayment_link__success_urlstringpayment_link.options.success_urlURL for successful payment redirect. Must be HTTPS
Pending URLpayment_link__pending_urlstringpayment_link.options.pending_urlURL for pending payment redirect. Must be HTTPS
Page Namepayment_link__namestringpayment_link.options.nameName of the page to display in the payment link
Page Intropayment_link__page_introstringpayment_link.options.page_introIntroductory text to display on the payment page
Expires Atpayment_link__expiresstringpayment_link.expiresISO 8601 datetime when link expires. Must be future date/time
Expires Inpayment_link__expires_innumberConvert to payment_link.expiresSeconds until link expires. Convert: new Date(Date.now() + (expires_in * 1000)).toISOString()
State 1state1stringpayment_link.state.state1Custom state field 1 for workflow tracking
State 2state2stringpayment_link.state.state2Custom state field 2 for workflow tracking
State 3state3stringpayment_link.state.state3Custom state field 3 for workflow tracking
State 4state4stringpayment_link.state.state4Custom state field 4 for workflow tracking
State 5state5stringpayment_link.state.state5Custom state field 5 for workflow tracking
State 6state6stringpayment_link.state.state6Custom state field 6 for workflow tracking
State 7state7stringpayment_link.state.state7Custom state field 7 for workflow tracking
State 8state8stringpayment_link.state.state8Custom state field 8 for workflow tracking
State 9state9stringpayment_link.state.state9Custom state field 9 for workflow tracking

Output Fields

Display NameField IDSource PathTypeDescription
Payment Link IDpayment_link__idpayment_link.idstringUnique payment link identifier
Payment Link URLpayment_link__urlpayment_link.urlstringShareable payment link URL
Expires Atpayment_link__expirespayment_link.expiresstringISO 8601 expiry datetime

Action: Get Payment Link

Endpoint: GET /c/api/instances/{instance_key}/payment_links/{payment_link_id}?expand=account,contract,charge,transaction,payment_method

Retrieves detailed information about a payment link including all related data.

TIP!: The Get Payment Link endpoint must include the expand parameter to retrieve all related data in a single API call.

Input Fields

Display NameField IDTypeAPI MappingDescription
Payment Link IDpayment_link__idstringURL parameter(Required) ID of payment link to retrieve (format: pl_1234_abcdef)

Output Fields

Display NameField IDSource PathTypeDescription
Payment Link IDpayment_link__idpayment_link.idstringPayment Link ID
Payment Link URLpayment_link__urlpayment_link.urlstringPayment Link URL
Statuspayment_link__statuspayment_link.statusstringCurrent status (ACTIVE, PENDING, COMPLETED, FAILED, EXPIRED)
Created Datepayment_link__createdpayment_link.createdstringCreated timestamp (ISO 8601 datetime)
Updated Datepayment_link__updatedpayment_link.updatedstringLast updated timestamp (ISO 8601 datetime)
Expiry Datepayment_link__expirespayment_link.expiresstringExpiry timestamp (ISO 8601 datetime)
Currencypayment_link__currencypayment_link.options.currencystringCurrency code
Amountpayment_link__amountpayment_link.options.amountstringPayment amount
Referencepayment_link__alt_keypayment_link.options.alt_keystringReference key
Customer CRM Keypayment_link__account_crm_keypayment_link.options.account.crm_keystringCustomer CRM key
Customer First Namepayment_link__account_first_namepayment_link.options.account.first_namestringCustomer first name
Customer Last Namepayment_link__account_last_namepayment_link.options.account.last_namestringCustomer last name
Customer Emailpayment_link__account_emailpayment_link.options.account.emailstringCustomer email
Customer Phonepayment_link__account_phonepayment_link.options.account.phonestringCustomer phone
Save Cardpayment_link__save_cardpayment_link.options.save_cardbooleanSave card setting
Skip Receiptpayment_link__skip_receiptpayment_link.options.skip_receiptbooleanSkip receipt setting
Page Success Messagepayment_link__page_success_messagepayment_link.options.page_success_messagestringSuccess message
Page Pending Messagepayment_link__page_pending_messagepayment_link.options.page_pending_messagestringPending message
Success URLpayment_link__success_urlpayment_link.options.success_urlstringSuccess redirect URL
Pending URLpayment_link__pending_urlpayment_link.options.pending_urlstringPending redirect URL
Page Namepayment_link__namepayment_link.options.namestringName of the page to display in the payment link
Page Intropayment_link__page_intropayment_link.options.page_introstringIntroductory text to display on the payment page
Account IDaccount__idpayment_link.account.idstringShuttle Account ID (format: acc_1234_abcdef)
Account Nameaccount__namepayment_link.account.namestringFull account name
Account Emailaccount__emailpayment_link.account.emailstringAccount email
Account Phoneaccount__phonepayment_link.account.phonestringAccount phone
Account Statusaccount__statuspayment_link.account.statusstringAccount status (ACTIVE, INACTIVE)
Contract IDcontract__idpayment_link.contract.idstringContract ID (format: co_1234_abcdef)
Contract Referencecontract__alt_keypayment_link.contract.alt_keystringContract reference
Contract Amountcontract__amountpayment_link.contract.amountnumberContract amount
Contract Currencycontract__currencypayment_link.contract.currencystringContract currency
Contract Statuscontract__statuspayment_link.contract.statusstringContract status (PENDING, COMPLETED, FAILED, EXPIRED)
Charge IDcharge__idpayment_link.charge.idstringCharge ID (format: cg_1234_abcdef)
Charge Amountcharge__amountpayment_link.charge.amountnumberCharge amount
Charge Statuscharge__statuspayment_link.charge.statusstringCharge status (PENDING, COMPLETED, FAILED)
Transaction IDtransaction__idpayment_link.transaction.idstringTransaction ID (format: tr_1234_abcdef)
Transaction Amounttransaction__amountpayment_link.transaction.amountnumberTransaction amount
Transaction Currencytransaction__currencypayment_link.transaction.currencystringTransaction currency
Transaction Statustransaction__statuspayment_link.transaction.statusstringTransaction status (PENDING, COMPLETED, FAILED)
Transaction Gateway Statustransaction__gateway_statuspayment_link.transaction.gateway_statusstringGateway status (APPROVED, DECLINED, ERROR)
Transaction Gateway Messagetransaction__gateway_messagepayment_link.transaction.gateway_messagestringGateway response message
Transaction Gateway Referencetransaction__gateway_referencepayment_link.transaction.gateway_referencestringGateway reference eg ID in Adyen / Stripe
Transaction Referencetransaction__referencepayment_link.transaction.referencestringTransaction reference, REF-000162622
Transaction Processedtransaction__processedpayment_link.transaction.processedbooleanTransaction processed
Payment Method IDpayment_method__idpayment_link.payment_method.idstringPayment method ID (format: pm_1234_abcdef)
Payment Method Typepayment_method__typepayment_link.payment_method.typestringPayment method type
Payment Method Statuspayment_method__statuspayment_link.payment_method.statusstringPayment method status
Payment Method BINpayment_method__binpayment_link.payment_method.binstringPayment method BIN
Payment Method Last 4payment_method__last4payment_link.payment_method.last4stringPayment method last 4
Payment Method Expirypayment_method__expirypayment_link.payment_method.expirystringPayment method expiry
Payment Method Namepayment_method__namepayment_link.payment_method.namestringPayment method name
Payment Method Sourcepayment_method__sourcepayment_link.payment_method.sourcestringPayment method source
Payment Method Gateway Referencepayment_method__tokenpayment_link.payment_method.tokenstringPayment method token gateway reference eg ID in Adyen / Stripe
State 1state1state.state1stringCustom state field 1
State 2state2state.state2stringCustom state field 2
State 3state3state.state3stringCustom state field 3
State 4state4state.state4stringCustom state field 4
State 5state5state.state5stringCustom state field 5
State 6state6state.state6stringCustom state field 6
State 7state7state.state7stringCustom state field 7
State 8state8state.state8stringCustom state field 8
State 9state9state.state9stringCustom state field 9

Action: Cancel Payment Link

Endpoint: DELETE /c/api/instances/{instance_key}/payment_links/{payment_link_id}

Cancels/archives a payment link, preventing any future payments.

Input Fields

Field IDTypeAPI MappingDescription
payment_link__idstringURL parameter(Required) ID of payment link to cancel (format: pl_1234_abcdef)

Output Fields

This endpoint returns an empty response (HTTP 204) on success.


Event: Payment Link Notification

This is a trigger that receives webhook notifications when payment link events occur.

Input Fields (Webhook Payload)

Field IDTypeSource PathDescription
actionstringactionEvent type that triggered webhook (see events list above)
payment_linkstringpayment_linkPayment link ID (format: pl_1234_abcdef)
accountstringaccountAccount ID (format: acc_1234_abcdef)
contractstringcontractContract ID (format: co_1234_abcdef)
chargestringchargeCharge ID (format: cg_1234_abcdef)
transactionstringtransactionTransaction ID (format: tr_1234_abcdef)
payment_methodstringpayment_methodPayment method ID (format: pm_1234_abcdef)
stateobjectstateCustom state object containing state1-state9 fields

Output Fields (Transformed for Workflow)

Display NameField IDTransformationTypeDescription
ActionactionDirect map from actionstringEvent type
Payment Link IDpayment_link__idMap from payment_linkstringPayment link ID (note the double underscore)
State 1state1Extract from state.state1stringCustom state field 1
State 2state2Extract from state.state2stringCustom state field 2
State 3state3Extract from state.state3stringCustom state field 3
State 4state4Extract from state.state4stringCustom state field 4
State 5state5Extract from state.state5stringCustom state field 5
State 6state6Extract from state.state6stringCustom state field 6
State 7state7Extract from state.state7stringCustom state field 7
State 8state8Extract from state.state8stringCustom state field 8
State 9state9Extract from state.state9stringCustom state field 9