Skip to main content
Once the user has entered all their payment information, you are ready to submit the fields and complete the session. This is typically done in a button’s onClick handler or a form’s onSubmit handler. To submit the sensitive data in the fields to Confido Legal, use the submitFields() method. For a more detailed explanation of the submitFields() method, see the Reference Docs.
You are now ready to finish the session from your server. You’ll need to set up an API endpoint where you can send the token and any additional non-sensitive data that was collected in the form.

Payment Session

Call the paymentSessionComplete mutation from your server when you are using a Payment Session to collect money. This is where you can set the amount to be paid and additional information.
Example mutation variables:

Save Payment Method Session

Call the completeSavePaymentMethod mutation from your server when you are saving a payment method for later use.
Example variables:
Now you can use the initiateSPMPayment mutation at any time to collect a payment using this payment method.