Set-up

Instructions

To automate payment creation using FormSG's form responses, follow the instructions in the Creating a form and payment service and Plumber set-up sections.

To automate the above and the sending of emails or e-letters to payers, follow the instructions in the Creating a form and payment service, Plumber set-up and Sending emails / letters sections.

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

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

  2. The following fields should be included in your form, as these will be used in PaySG to create your payment link later on. These fields are included in the template provided. The fields may be renamed if necessary, but the details must either be collected through the form or manually input in Plumber (Creating payments with PaySG).

    1. Reference ID

      If not required for your use case, you can manually input a placeholder (e.g. N.A.) on Plumber.

    2. Name

    3. Payment amount

      For forms without fixed responses/dropdown, use a "Decimal" field on FormSG and enable Number validation to only accept values ≥ 0.50 and <= 999999,99 (card payments) / 200000 (PayNow payments).

    4. The following fields are optional:

      1. Email

        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. For one-time payments, follow the steps in our payment service creation guide. For subscriptions, follow the steps in our subscriptions guide.

  2. Log in to staging.pay.gov.sg and pay.gov.sg before contacting us (go.gov.sg/contact-paysg) to get an API key. You will need this to connect the payment service to Plumber. Ensure that you include the email address for the API key to be issued to. You may refer to our FAQ on API keys for more information.

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.

Creating payments with PaySG

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

Sending emails

Follow the interactive demo below to send PaySG's default payment emails:

Follow the interactive demo below to send customised emails using Postman:

Sending letters

You may view a demonstration at go.gov.sg/paysg-fine-demo. Please use your gov.sg email for form input.

Last updated

Was this helpful?