Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add payment content details to readme #106

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ The underlying cryptosystem is `x25519-xsalsa20-poly1305` which is implemented b
| encryptedContent | string | The encrypted submission in base64. |
| created | string | Creation timestamp. |
| attachmentDownloadUrls | Record<string, string> | (Optional) Records containing field IDs and URLs where encrypted uploaded attachments can be downloaded. |
| paymentContent | Object (more details can be found [below](https://github.com/opengovsg/formsg-javascript-sdk?tab=readme-ov-file#format-of-payment-content)) | Details of payment made for the unique response

### Format of Decrypted Submissions

Expand Down Expand Up @@ -178,6 +179,21 @@ Attachments are end-to-end encrypted in the same way as normal form submissions,

_Warning:_ We do not have the ability to scan any attachments for malicious content (e.g. spyware or viruses), so careful handling is needed.

### Format of Payment Content
The payment content object will contain the following fields if a payment is associated with the fom. Otherwise, an empty object `{}`` will be returned.

| Key | Type | Description |
| ----------- | -------- | -------------------------------------------------------------------------------------------------------- |
| type | string | The type of payment made e.g. payment_charge |
| status | string | The status of the payment |
| payer | string | The payer's email address |
| url | string | The invoice download url |
| paymentIntent | string | A unique identifier of payment |
| amount | string | Payment amount |
| productService | string | A breakdown of the product and quantity selected and paid through the form |
| dateTime | string | Payment timestamp |
| transactionFee | string | Transaction fee |

## Verifying Signatures Manually

You can use the following information to create a custom solution, although we recommend using this SDK.
Expand Down
Loading