Edit this page

Purchase Domains with Stripe

Partner API v2 Deprecation

Partner API v2 was deprecated on Feb 12, 2024. Please check the v3 specification for integration guides.

Unstoppable Domains supports Stripe payments to process payments from Partners. Stripe is a payment provider that allows you to accept credit cards, PayPal, and Apple Pay from customers. This is a recommended and secure payment method for partners that mostly use client-side applications.

The diagram below illustrates the general process between a Partner and Unstoppable Domains during the process of buying a domain with Stripe.

Success flow for buying domains with Stripe

Success flow for buying domains with Stripe

Step 1: Connect Stripe to Unstoppable Domains

Click on the Connect button in the Stripe section of your Sandbox or Production Partner account. Unstoppable Domains uses different Stripe API keys for the Sandbox and Production environments.

Stripe connect button

Stripe connect button

After clicking the Stripe CONNECT button, Stripe will walk you through the business integration form:

Stripe business integrations form to connect your Stripe and UD accounts

Stripe integrations form to connect your Stripe and UD accounts

Once your Stripe and Unstoppable Domains accounts have been connected, your Stripe API key will appear directly in your Stripe dashboard.

Stripe connect success

Stripe connect success

Step 2: Retrieve Your Reseller ID and Secret API Token

To access your ResellerID and Secret API Token, you must navigate to your Sandbox or Production Partner dashboard. The ResellerID is used to identify the requests as coming from a Partner, while the Secret API Token is used for authentication to ensure that only authorized Partners can access the API.

Step 3: Prepare Request Body

When making an order, the body must contain information about your domain order in JSON format with the following structure:

Copy
Copied
{
  "payment": {
    "method": "stripe"
  },
  "domains": [
    {
      "name": string, // domain name you are minting
      "ownerAddress": string, // wallet address to mint the domain to
      "email": string, // UD email address to link the domain to
      "resolution": object // predefined records to mint the domain with
    }
  ]
}
  • payment : A key-value dictionary with payment information about the order:
    • method : (string) The payment method the API should create. For Stripe payments, the value should be "stripe" .
  • domains : (array) An array with information about the domains you want to purchase:
    • name : The domain name you want to purchase. This parameter is required.
    • ownerAddress : The wallet address the domain should be minted to. This parameter is required.
    • email : The email address the domain should be linked to after purchase. The user can mint the domain from their UD dashboard later. This parameter is optional.
    • resolution : A key-value pair of resolution records to configure for the domain after minting. See the Records Reference guide for supported key values. This parameter is optional.

Step 4: Prepare Authorization Headers

The Partner API uses bearer tokens to authorize requests with the Secret API Token from your Partner credentials.

Field Name Value
Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer Format a token provided by Unstoppable Domains

Step 5: Use the Orders Endpoint

Send a POST request with the authorization headers and request body you have prepared to the Buy a Domain or Claim Free Domain endpoint. Here is the URL for our API environments:

Sandbox Environment:

Copy
Copied
https://api.ud-sandbox.com/api/v2/resellers/{PARTNER_RESELLERID}/orders/

Production Environment:

Copy
Copied
https://unstoppabledomains.com/api/v2/resellers/{PARTNER_RESELLERID}/orders/
info

The PARTNER_RESELLERID path parameter is the same one you retrieved from your partner account earlier.

Step 6: Retrieve the Stripe Payment Intent ID

Under the hood, Unstoppable Domains uses Stripe's Payment Intents API to process Stripe payments and generates a Payment Intent ID for the partner to complete the payment. The Buy a Domain or Claim Free Domain endpoint response follows this format:

Copy
Copied
{
  "orderNumber": "{ORDER_NUMBER}",
  "total": "{TOTAL_ORDER_PRICE}",
  "payment": {
    "method": "stripe",
    "details": {
      "clientSecret": "{STRIPE_CLIENT_SECRET}",
      "paymentIntentId": "{STRIPE_PAYMENT_INTENT_ID}"
    }
  },
  "items": ["{DOMAINS_TO_PURCHASE}"]
}

The value of the clientSecret and paymentIntentId fields can be used with the Stripe Payment Intents API to complete the payment.

Example

Here is an example request to purchase a domain with the following details using the Stripe payment method:

Field Name Value
Domain Name partner-test-67687986466871.wallet
Customer Wallet Address 0x6EC0DEeD30605Bcd19342f3c30201DB263291589
Customer Email sandbox-test@unstoppabledomains.com
Predefined Domain Records {"crypto.ETH.address": "0x6EC0DEeD30605Bcd19342f3c30201DB263291589", "crypto.BTC.address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"}
RequestResponse
Copy
Copied
curl --location --request POST 'https://api.ud-sandbox.com/api/v2/resellers/{PARTNER_RESELLERID}/orders' \
--header 'Authorization: Bearer {SECRET_API_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payment": {
        "method": "stripe"
    },
    "domains": [
        {
            "name": "partner-test-67687986466871.wallet",
            "email": "sandbox-test@unstoppabledomains.com",
            "ownerAddress": "0x6EC0DEeD30605Bcd19342f3c30201DB263291589",
            "resolution": {
                "crypto.ETH.address": "0x6EC0DEeD30605Bcd19342f3c30201DB263291589",
                "crypto.BTC.address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
            }
        }
    ]
}'
Copy
Copied
{
  "orderNumber": "78085",
  "total": 500,
  "payment": {
    "method": "stripe",
    "details": {
      "clientSecret": "pi_3LbAAG8POyZCUJh0h2YXvwg_secret_nktbz6kcVk8U1X5UJI36BA6c",
      "paymentIntentId": "pi_3LbABAG8POyZcuJhen2YXwwo"
    }
  },
  "items": [
    {
      "domain": {
        "id": 971624,
        "name": "partner-test-67687986466871.wallet",
        "ownerAddress": null,
        "resolver": null,
        "resolution": {},
        "blockchain": "MATIC",
        "registryAddress": "0x2a93c52e7b6e7054870758e15a1446e769edfb93",
        "networkId": 80001,
        "freeToClaim": true,
        "node": "0xbf153dc812a038ec41a8f332e20e2b927da06e035592857308745febac1fe855"
      },
      "mintingTransaction": {
        "id": 45081,
        "type": "MaticTx",
        "operation": "MintDomain",
        "statusGroup": "Pending",
        "hash": null,
        "blockchain": "MATIC",
        "blockExplorerUrl": null
      }
    }
  ]
}

Receive Stripe Payouts

Stripe payouts occur daily directly from Stripe and can be tracked within your Partner account by clicking on the View Dashboard button, depending on which payouts are being tracked.

info

The View Dashboard button will only appear after you have successfully connected your Stripe and Unstoppable Domains Partner accounts.

Stripe Payouts Tab

Clicking the View Dashboard button displays the main tab of the payouts screen, which lists all transactions with dates and payment amounts. The image below shows the main view of the Payouts screen:

Main/default view of Stripe Payouts (i.e., payouts tab)

Main/default view of Stripe Payouts (i.e., payouts tab)

Stripe Accounts Tab

Click the Account tab to view Stripe account information or update your Stripe banking information.

View of Stripe Account information (i.e., account tab)

View of Stripe Account information (i.e., account tab)
congratulations!

You have successfully purchased a domain using the Stripe payment method.