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:
A form and its corresponding secret key.
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 to link the form to Plumber.
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).
Reference ID
If not required for your use case, you can manually input a placeholder (e.g. N.A.) on Plumber.
Name
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).
The following fields are optional:
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.
Address
Identifier (e.g. NRIC/FIN)
Payment service creation
For one-time payments, follow the steps in our payment service creation guide. For subscriptions, follow the steps in our subscriptions guide.
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.
Once you've been onboarded to LetterSG, refer to Plumber's guide on connecting LetterSG to Plumber.
Last updated
Was this helpful?