See the full UMA invitations guide for details outside of the context of the Grid API.
Overview
The invitation system enables:- Platform users to create invitations with optional payments for others
- Direct prospects to sign up for your services by claiming an invitation to receive payment
- Tracking of invitation status (pending, claimed, expired)
- Webhook notifications when invitations are claimed
Setup
Before starting your implementation, we recommend configuring UMAs and invitations in the dashboard. You will need to provide:- A name and a logo to be displayed in the invitation page.
- A list of countries you operate UMA in.
- An onboarding URL for people who want to create an account with you (this URL must support invitation codes). Example:
http://myplatform.com/uma?code=INVITATION_CODE
- A webhook URL to get notified when your invitations get claimed.
Creating Invitations
To create an invitation, make a POST request to/invitations
with the inviter’s UMA address:
url
field is the URL where the invitee can claim the invitation. For example, for the response above, you might want to generate a share message
for the user with text like: “Get an UMA address so that I can send you some money! https://uma.me/i/019542f5
”. The inviter can then share this URL with the invitee.
When the invitee clicks the URL, they will be presented with a list of UMA providers available in their region. The invitee can select one of the providers and onboard to create their UMA address.
Pay-by-Link Invitations
The Grid API supports a “pay-by-link” feature that allows users to create invitations that include a payment amount. This is useful for scenarios where you want to send money to someone who doesn’t yet have a UMA address or where the sender doesn’t know the receiver’s UMA address. They can simply share a link via email, SMS, whatsapp, or other channels to send money. To create a pay-by-link invitation, include theamountToSend
field when creating the invitation:
INVITATION_CLAIMED
webhook. At this point, you should:
- Check the
amountToSend
field in the webhook payload - Create a quote for the payment amount (sender-locked)
- Execute the payment to the invitee’s UMA address
amountToSend
field is primarily used for display purposes on the claiming side of the invitation.
These payments can only be sender-locked, meaning that the sender will not know ahead of time how much the receiver will receive in their local currency. The exchange rate will be determined at the time the payment is executed. If you’d like, you can also send a push notification to your sending user when you receive the INVITATION_CLAIMED
webhook and have them approve the payment interactively instead.
Best practices
- Always set an expiration time for invitations with a payment amount to avoid huge swings in expected exchange rates or leaked links.
- Allow the inviter to cancel the invitation if they want to avoid sending a payment to the wrong person if the link is leaked.
- Notify the inviter when the invitation is claimed so that they can see the amount received by the invitee.
Claiming Invitations
Once onboarding (or login from an invite link) is complete, the invitee’s new VASP (which may or may not be the same as the inviter’s Grid API platform) will need to claim the invitation by making a POST request to/invitations/{invitationCode}/claim
including the invitee’s newly-created UMA address:
- Associate the invitee’s UMA address with the invitation
- Change the invitation status from
PENDING
toCLAIMED
- Trigger an
INVITATION_CLAIMED
webhook to notify the inviter’s platform of the claim
Cancelling Invitations
To cancel a pending invitation, make a POST request to/invitations/{invitationCode}/cancel
:
- Change the invitation status from
PENDING
toCANCELLED
- Make the invitation URL show as cancelled when accessed
- Prevent the invitation from being claimed
Invitation Status
An invitation can be in one of four states:PENDING
: The invitation has been created but not yet claimedCLAIMED
: The invitation has been successfully claimed by an inviteeEXPIRED
: The invitation has expired and can no longer be claimedCANCELLED
: The invitation has been cancelled by the inviter or platform
/invitations/{invitationCode}
.
Webhook Integration
When an invitation is claimed, the Grid API will send anINVITATION_CLAIMED
webhook to your configured webhook endpoint. This allows you to:
- Track invitation usage and conversion rates
- Apply referral bonuses or rewards to the inviter
- Update your UI to reflect the claimed status
Best Practices
- Expiration Times: Consider setting appropriate expiration times for invitations based on your use case
- User Experience: Provide clear feedback to users about invitation status and next steps
- Monitoring: Track invitation metrics to understand user acquisition patterns
Error Handling
Common error scenarios to handle:- Invalid invitation code
- Expired invitation
- Already claimed invitation
- Rate limit exceeded
- Missing required fields