For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payment integrations / automations

You can integrate payments with external systems using our webhooks functionality.

Basic overview of what webhooks are and how it works can be found here.

With payment webhooks, FormSG can be all your online payment form needs, connected to backend systems

  • using a workflow builder like Plumber.gov.sg or

  • with the help of an IT team to integrate with agency systems.

Setting up through Plumber

  1. Have your form URL and secret key ready Before embarking on the steps below, ensure that your form is already ready to collect responses and a payment field has been created.

  2. Login to plumber.gov.sg (automation workflow builder)

  3. Create new pipe (workflow)

  4. Choose FormSG as a trigger Click on the dropdown to "Choose an app".

    For our payments tutorial, choose "FormSG" for the trigger app.

    Choose "New form submission" as trigger event. Selecting this means that the workflow runs whenever a new form submission is received.

    Once you have done so, you may click continue.

  5. Add connection To set-up a connection between FormSG and Plumber, we make use of webhooks. Click on "Add new connection".

    Enter your form URL and secret key. Do ensure that the URL is in the correct format and does not contain /admin/form in it. Click "Submit".

    Once you have successfully connected, a green tick will appear and you may continue.

    You will also notice on your form settings, that an endpoint URL has been automatically added. Note that FormSG only supports one webhook URL at a time. Toggle "Enable retries" to on.

  6. Perform a test submission In order for Plumber to identify what appears in a form submission, you would need to perform a test submission in FormSG (not in preview mode).

    To do this, open up your form. Back in FormSG, you may locate the form link in the share button.

    For a payments form, you would need to make a real payment as well. We suggest creating a category that collects $0.50 (minimum amount to transact) for this purpose. Enter all mandatory and optional fields that you would like Plumber to pick up. Plumber is not able to handle hidden fields via logic at this point. If hidden fields are necessary, you may reach out to the Plumber/FormSG team for direct assistance if required.

    Proceed to complete payment. PayNow is recommended due to lower fees and there is no fixed fee involved. For a $0.50 payment, you will be incurring $0.01 fees (rounded up).

    If you have reached the payment success page, it means a form submission has been recorded. You may switch back to Plumber.

    On Plumber, click "Test Step".

    Plumber will display received test data. These can be used for all subsequent actions for automations such as customised emails, updated to databases or as conditions for branching automations. For payment forms, we also include additional variables such as receipt URL, payment type, payer email, gross amount, transaction fees, product/service and quantity chosen.

    Note that if you add any new fields into your form, you will need to repeat step 7 again.

  7. Automate your workflow by adding more actions for endless possibilities!

    • Send customised notifications to different departments based on payment service chosen.

    • Consolidate payments from different forms into a single database

    • Track payments statuses from a list of payees

    • Perform logic based on payment value (Greater than, less than)

    • Send reminders for a specific payment

    • Create unique entry codes for an event

    Not sure what you can automate? Chat with us here.

Last updated

Was this helpful?