Suitelet Payment Portal Questions
(sorry in advance this is a bit long!)
Hello,
I am developer looking into how to build a Suitelet that would accept credit cards for invoice payment, as well as allow the customer to apply any credit memos they may have. The Suitelet would send the payment to a certified payment processor, like Square, Versapay, Cybersource, etc.
My thoughts so far would be:
(1) to have a link generated for the customer upon invoice creation. That link would be to a Suitelet, but it doesn’t look like the Payment Link in NS settings do that, instead creates links for a suitepayments.com link (this step is where I know the least about what NS offers)
(2) At the Suitelet, build out the customer’s data for the invoice, credit memos, etc in the typical way Suitelets are built (built a lot of them, and this part seems the ‘easiest’)
(3) Any PCI Compliance concerns. Would like the customer to be able to use any card already stored, as well as add a new one if desired.
(4) The customer selects or enters their card, makes any needed selections or adjustments to the amount to pay based on the available invoice and credit memo data, and submits their payment
(5) Payment data is sent to the certified payment processor’s endpoint, according to their documentation
(6) Receive response from payment processor, and handle a success with a redirect and an error with simple messaging
So my questions:
– What is the best way to generate the link? I have built Suitelets for unique vendor’s Purchase Orders, but I am curious if NS has something more for this that I am not aware of? Can a SuitePayments UI be customized like a Suitelet?
– Would the addCredentialField() of the ui/serverWidget be the best way for handling the credit card info in the Suitelet for compliance? As in, it would encrypt the credentials for use with the processor
– Trying to figure this out by searching through NS’s documentation has lead to some good ideas as well as rabbit holes that don’t apply. If you know the best way to search the docs for this, or have specific documentation links about this, that would be great!
– What other potential issues am I missing here, or (vague I know) just any general ideas about the best way to do this would are greatly appreciated!
I’ve written some pretty cool Suitelets in the past, but this would be my biggest project, and I am excited. So, thank you again, in advance, for any help!!
We actually built something similar using a Suitelet, which works well for showing open invoices and collecting payments. Just make sure to handle auth properly. Token-based access helped a lot in our case.
Please let me know if you still need help with this i have the code already



