Email claims
The Phosphor platform supports sending an NFT to an email address. In this way, the recipient of the NFT is not required to have a wallet ahead of time, and can create one as part of the claim flow.
When sending email claims, the platform allows you to use your own email provider via integrations with popular SaaS email providers. This means you can send emails from your own domain and reach your buyers with a coherent voice. Currently, the platform supports Mailgun, Amazon SES, and custom SMTP server providers such as Gmail, iCloud, and Outlook.
Gas fees can be paid by either the buyer redeeming the claim, or the seller (in this case, you) creating the claim. The following table describes the course of action by each transaction payer.
Transaction payer | Action |
---|---|
SELLER | Based on the minted state of the item, either the transfer or mint is paid for by your account balance. This is the default state. |
BUYER | The collection token contract must be compatible with the MINT_VOUCHER capability. A mint voucher is returned as part of the /email-claims/<SafeString:claim_token>/redeem response. The user can then call the collection token contract and mint their NFTs. |
Email templates
The Phosphor platform provides customizable email templates to notify your buyer during the claim process. All templates are configurable using HTML via our Dashboard or API calls to the email-templates
endpoints.
The email templates are rendered using handlebars v3 style templates. You can customize multiple versions of email templates through managing email campaigns.
Claim flow
The basic flow for the email claims has three different actors:
- API consumer - Any process or actor that can make REST requests to either the public and/or private API's.
- Private API - Contains all the private API endpoints.
- Public API - Contains all public API endpoints accessible to the public.
The flow is as follows:
- API Consumer sends a
POST
to the privateemail-claims
endpoint. - Private API responds with a
201
after sending an email with a secretclaim token
. - API Consumer sends a
GET
to the public/email-claims/<claim_token>/verify
endpoint. - Public API responds with the claim details that match the
claim token
. - API Consumer sends a
POST
to the publicemail-claims/<claim_token>/redeem
endpoint. - Public API responds by sending back a
201
to indicate that the NFT has been minted/transferred or returns a mint voucher as part of the response.