Skip to content

Latest commit

 

History

History
102 lines (64 loc) · 4.75 KB

README.md

File metadata and controls

102 lines (64 loc) · 4.75 KB

Pinch Zapier

Deploy

Zapier CLI Integration

Source code for the Zapier integration with Pinch

Running the Zapier tests locally

Create a .env file in your root directory and fill it out with your pinch test keys.

ENVIRONMENT=test
MERCHANT_ID=mch_test_XXXXXXXXXXX
SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXX

Run npm ci then npm run zapier:test in your console to run the zapier integration tests.

Adding Pinch to your Zapier

Step 1: Find the Integration on Zapier and connect to your Zapier account.

Step 2: Signup to Pinch so that you can access your generated API keys from the portal.

Step 3: In Zapier, select new Zap and search for Pinch Payments and add connection. You will be presented with the screen below. Fill this out with the required details by clicking the links in the help text to be taken to the API keys area.

add-connection

Step 4: Press confirm and Zapier will create a connection to Pinch.

connections

Note: You can add as many connections as you would like. On the example above we have a test connection as well as a live connection. Useful if you would like to test out a Zap functionality without affecting your production merchant.

Integrations

This integration contains 9 triggers, 5 actions, and 3 searches:

Triggers

  • New Event
  • Bank Results Event
  • Scheduled Payments Processed Event
  • Payer Created Event
  • Payer Updated Event
  • Realtime Payment Event
  • Subscription Created Event
  • Subscription Cancelled Event
  • Subscription Completed Event

Actions

  • Create Payer
  • Create Realtime Payment
  • Create Scheduled Payment
  • Create Payment Source
  • Create Subscription

Searches

  • Find Payer
  • Find Subscription
  • Find Event

Triggers

The Pinch integration for Zapier has 8 different triggers, these are all related to events that happen within the Pinch platform. The New Event trigger will return all event types without the specific payloads so will need to be used in conjunction with the Find Event action to get the data behind it, this trigger is for more advanced integrations that are not covered by the other event triggers.

Bank Results Event is triggered when a bank account transaction returns (as these take time to process) and could result in a dishonour status. If you are taking bank account transactions you will need to listen for this event otherwise you may miss failed payments.

Payer Created Event is triggered when a new Payer is created in Pinch.

Payer Updated Event is triggered when a Payer is updated in Pinch (This includes a Payment Source being added)

Realtime Payment Event is triggered when a new Realtime Payment is created in Pinch.

Subscription Created Event is triggered when a Subscription is created for a Payer.

Subscription Cancelled Event is triggered when a Subscription is cancelled.

Subscription Completed Event is triggered when a Subscription is run to completion.

Actions

The integration contains actions to upsert payers, create a scheduled payment, create a realtime payment and also adding a payment source to a payer. For many of these steps, you are required to enter data in a particular format that Pinch will understand. See the Pinch documentation on what objects are expected and returned for each action.

Searches

Because the event notification from Pinch only contains basic information such as a EventId and EntityId (such as PaymentId or PayerId), you may need to search Pinch for more information. For example, to load all data about a Payer you can use a Find Payer action. You can search for an item based on the id returned from the event.

Examples