Set-up

Payment forms use 3 platforms: PaySG, FormSG, and Plumber. You'll need to do some set up on each platform.

What you'll need to do:

  1. Create a FormSG form with our required fields

  2. Create a pipe on Plumber to transform each form submission to a payment amount

  3. Connect your form to PaySG

This guide will take you through each step and its setup.

Creating a form and payment service

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 (go.gov.sg/contact-paysg)

Form creation

Create a storage mode form on FormSG and save your secret key securely. You’ll need this to view responses and link the form to Plumber. Use our form template to get started.

Form field setup

The following fields should be included in your form, as these will be used in PaySG to create your payment link later on. You can rename the fields if necessary, but the details must either be collected through the form or manually input in Plumber.

All fields are already included in our form template.

Myinfo logins are not supported.

  1. Reference ID (corresponds to FormSG Reference Field Answer on Plumber)

    1. This field must be included for security purposes and to connect your form to a payment service. You may refer to the screenshot below to retrieve your reference ID value when necessary.

    2. This is a "Short answer" field with "Enable pre-fill" and "Prevent pre-fill editing" enabled.

    3. PaySG will automatically pre-fill this field with a unique ID for each form submission.

  2. Name

  3. Payment amount

    1. For forms without fixed responses/dropdown, use a "Decimal" field on FormSG and enable Number validation to only accept values ≥ 0.50 and <= 200,000.

  4. Email (Compulsory for subscriptions)

The following fields are optional:

  1. Email (Optional only for one-time payments)

    1. Note that PaySG sends automated payment receipt emails only if an email is included. If an email is not included, payers will not receive payment receipt emails. They may reference the original payment link to view receipts after successful payment.

  2. Address

  3. Identifier (e.g. NRIC/FIN)

Payment service creation

  1. Set up a payment service depending on your needs

    1. Payment Service Creation for one-time payments, or

    2. Subscriptions for recurring payments.

  2. Contact us at go.gov.sg/contact-paysg to get an API key. Include the email address that you'd like the API key to be issued to. You may refer to our FAQ on API keys for more information. Ensure that you save the API key securely.

Plumber set-up

Accepting FormSG responses

Follow the interactive demo below or refer to Plumber's guide to learn how to connect FormSG and PaySG on Plumber to create payment links.

Converting payment amount into cents

The payment amount from your form must be converted into cents before you can create payment links using PaySG.

Connecting your form to your payment service

In order to complete the Plumber set-up, you'll need to connect your form on PaySG.

Once you've connected your form, retrieve the payment form link to complete the Plumber set-up.

  1. Access your payment service.

  2. Access the "Forms" tab under your payment service and select the connected form.

  3. Copy the Payment form link.

Creating payments with PaySG

Now that your pipe can accept FormSG responses and transform the payment amount, follow the interactive demo to complete your Plumber set-up with PaySG. To include information from your form responses in your PaySG report, ensure that you follow the steps in the interactive demo to include Additional responses.

Collecting payments with payment forms

Once you've published your Plumber pipe, retrieve your payment form link and begin collecting payments.

Last updated

Was this helpful?