PaySG and Plumber guide

This guides includes instructions on how to create your own Plumber pipe to link FormSG and PaySG to collect payments.

Creating components to use in Plumber

You will need:

  1. A form and its corresponding secret key.

  2. A payment service and an API key, issued to you by the PaySG team (team@pay.gov.sg)

Form creation

  1. Create a form on FormSG and save your secret key. You’ll need this to view responses and to link the form to Plumber. A template can be found here.

  2. Some fields that you should include in your form as these will be used to create your payment link later on. These fields have been included in the template.

    1. Reference ID (if not required for your use case, you can manually input a value like '-' on Plumber later on)

    2. Payer’s name

    3. Payer’s email

    4. Payer’s address (if not required for your use case, you can manually input a value like '-' on Plumber later on)

    5. Payer’s identifier (could be NRIC or any other identifier of your choice)

    6. Payment amount (must be in cents).

Payment service creation

  1. Create a payment service on PaySG’s staging environment: staging.pay.gov.sg. Ensure that you test out the workflow/pipe on our staging environment before moving to our production environment at pay.gov.sg.

  2. During the creation of the payment service, you’ll need to select a payment method. For Stripe, please create an account at https://dashboard.stripe.com/register. Creating a Stripe account is free. Ensure that the Stripe account is set to test mode.

  3. Contact us at team@pay.gov.sg to get an API key for your payment service. You will need this to connect the payment service to Plumber.

Connecting FormSG and PaySG on Plumber

Create a pipe at plumber.gov.sg. Note that collaborators cannot be added to the pipe. Should you require shared access to the pipe, we recommend that you create a group email and use it to access and create pipes on Plumber.

Setting up FormSG as a trigger.

Follow Plumber's guide to set up your form as a trigger. Once complete, move to the next step to complete PaySG as an action.

Setting up PaySG as an action

Follow Plumber's guide to connect PaySG.

  • Once you've connected PaySG, proceed to set up the action.

  • Select the input accordingly. You can choose to manually input fields or select from the form response.

Set up PaySG's Send Payment Email as an action

Choose the "Send Payment Email" event to send out PaySG's payment email to payers once the payment link has been created.

If you would like to send the payment link in your own customise email, refer to Plumber's guide on sending an email via Postman.

Last updated