Claim an invitation
Once an invitee has an UMA, the invitee's VASP can claim the invitation. This will inform the inviter's VASP that the UMA has been created so that inviter and invitee can transact together easily.
Note that the phone number of the invitee is never sent as-is to Lightspark's servers. It is hashed locally by the SDK, then that hash is sent to Lightspark to help detect duplicates and fraud. Your customer privacy is preserved.
// The phone number MUST be provided in the E. 164 Format.
// [+][country code][area code][local phone number]
const inviteePhoneNumberE164 = "+11234567890";
const invitation = await client.claimUmaInvitationWithIncentives(
/* invitationCode */ "ABCDEF123456",
/* inviteeUma */ "$bob@testvasp2.com",
inviteePhoneNumberE164,
RegionCode.PH
);
console.log(`The unique code for the invitation is ${invitation.code}`);
// You can check the status of the incentives:
console.log(
`The status for the invitation's incentives is ${invitation.incentivesStatus}`
);
if (invitation.incentivesStatus === IncentivesStatus.VALIDATED) {
console.log("The incentives have been sent!");
}
if (invitation.incentivesStatus === IncentivesStatus.INVALID) {
console.log("This invitation did not trigger incentives.");
}
If the VASP does not participate in the Lightspark UMA Incentives Program, they should claim the invitation using the following SDK functions.
const invitation = await client.claimUmaInvitation(
/* invitationCode */ "ABCDEF123456",
/* inviteeUma */ "$bob@testvasp2.com"
);
console.log(`The unique code for the invitation is ${invitation.code}`);