Create a payment instrument
Tokenization
Use iframe from tokenization-form-sandbox.synswi.com/card-form
and tokenization-form-sandbox.synswi.com/bank-form
with query parameter accountId
- Render the iframe
- Post message with a type of
submit_form
to iframe - Listen to message event with type of
tokenization_success
to get thepaymentInstrumentId
Below are all the messages events the iframe emits:
{
paymentInstrumentId: "string",
type: "tokenization_success"
}
{
message: "string",
type: "tokenization_failure"
}
Below are all the messages that you will send to iframe
{
type: 'submit_form'
}
{
type: 'clear_form'
}
[updatedIn] a day ago
Tokenization