Lightspark
Lightspark

The Invitation object

In all the actions you can take (create, claim, fetch), the object that is returned is an UmaInvitation. It has the shape below:
  • code: a string that represents the code that uniquely identifies the invitation
  • inviter_uma: a string that represents the UMA of the inviter
  • inviter_first_name: an optional string that represents the first name of the inviter.
  • invitee_uma: an optional string that represents the UMA of the invitee
  • status: an enum that represents the current status of the invitation
    • PENDING: the invitation has been created but not yet claimed
    • CLAIMED: the invitation has been claimed by an invitee
    • CANCELLED: the invitation has been cancelled by the inviter
    • EXPIRED: the invitation has expired and can no longer be claimed
  • payment_amount: an optional object that represents the payment amount attached to the invitation
    • value: a number representing the amount in the lowest currency unit (e.g. cents for USD)
    • currency: an object containing currency details
      • code: the currency code (e.g., "USD")
      • symbol: the currency symbol (e.g., "$")
      • decimals: the number of decimal places for the currency
      • name: the full name of the currency (e.g., "US Dollar")
  • cancelled_at: an optional string representing the date and time when the invitation was cancelled
  • expires_at: an optional string representing the date and time when the invitation will expire
  • incentives_status: an enum that represents the current status of the incentives
    • PENDING: incentives have not been processed yet
    • VALIDATED: incentives have been approved for this invitation
    • INVALID: incentives have been declined for this invitation
  • incentives_ineligibility_reason: an optional enum that reprensents the reason why the incentives have been declined.
    • DISABLED: This invitation is not eligible for incentives because it has been created outside of the incentives flow.
    • SENDER_NOT_ELIGIBLE: This invitation is not eligible for incentives because the sender is not eligible.
    • RECEIVER_NOT_ELIGIBLE: This invitation is not eligible for incentives because the receiver is not eligible.
    • SENDING_VASP_NOT_ELIGIBLE: This invitation is not eligible for incentives because the sending VASP is not part of the incentives program.
    • RECEIVING_VASP_NOT_ELIGIBLE: This invitation is not eligible for incentives because the receiving VASP is not part of the incentives program.
    • NOT_CROSS_BORDER: This invitation is not eligible for incentives because the sender and receiver are in the same region.
For example:
{
    "code": "ABCDEF123456",
    "inviter_uma": "$alice@vasp1.com",
    "invitee_uma": "$bob@vasp2.com",
    "status": "CLAIMED",
    "payment_amount": {
        "value": 1000,
        "currency": {
            "code": "USD",
            "symbol": "$",
            "decimals": 2,
            "name": "US Dollar"
        }
    },
    "cancelled_at": null,
    "expires_at": "2024-12-31T23:59:59Z",
    "incentives_status": "INVALID",
    "incentives_ineligibility_reason": "RECEIVER_NOT_ELIGIBLE"
}