Create a payment address

Discover how to create a payment address on the Speed platform. You can create payment addresses via the web application or programmatically via robust APIs.

A complete end-to-end flow for creating payment addresses is provided below.

Create payment address via web application

Log in to your Speed account and follow the steps below to create a payment address:

  • On the left sidebar, click Receive Payments > Payment Addresses.
  • Click on Create New.
  • After clicking on the create new button, you will be directed to the create page, where you will fill out the required details, such as domain and username.
  • Click on the Create. This will redirect you to the detail page, where you can see the payment address you created and its details.
  • Now share it and get paid.

Create payment address via API

Let us understand how you can create a payment address using APIs.
Make a POST /payment-addresses request specifying the following mandatory parameters

{
"username":"test",
"success_message": "Thanks for your payment"
}

Note: The default domain will be @tryspeed.com if the merchant doesn’t create a custom domain and use it.

You can also include other optional parameters like a statement descriptor, a success URL, and others. If optional parameters are not specified, then the payment page will be rendered without a description.

Request Parameters are as follows:

ParameterRequiredTypeDescription
usernameStringIn this parameter, you must specify a unique username to create a payment address.

Username remains unique for the domain selected regardless of whether you're in test mode or live mode.
domainStringIn this parameter, you can specify your custom domain if you have added already one or the system will automatically fall back to to default domain i.e. tryspeed.com.
success_urlStringIf the payment is successful, the customer will be shown the URL in their wallet, if defined.
success_messageStringMessage customers will see when they make payment via their preferred wallet.

More information can be found in our API reference.

The request headers are as follows:

ParameterRequiredTypeDescription
speed-versionstringAs of now, there are two versions (2022-04-15 and 2022-10-15). Version 2022-10-15 supports both on-chain and lightning payment methods. When passing payment methods through the API, the default settings in the Speed web application will be overridden.

The response attributes for 2022-10-15 are as follows:

{
"id": "pa_lhog3xsbQYaY1d6k",
"object": "payment.address",
"status": "active",
"currency": "SATS",
"payment_request": "lnurl1dp68gurn8ghj7ctswpshq6fww3e8jumsv4jkgtnyv4mz7mrww4exc0m385enycfsv5cxgvpnv3snsdrzxdnrjdmpv56nsdtyvgcrxdpnx5unxcenvyurjwr98ycrzvpjv3jnser98yuxyd3cxq6kyvfcvsmrzvty3ma36s",
"address": "[email protected]",
"username": "test",
"domain": "tryspeed.com",
"statement_descriptor": null,
"success_message": "Thanks for your payment",
	"success_url": null,
"created": 1684130991087,
"modified": 1684130991087
}

Attributes


id string
Unique identifier for the object.


object string
The type of the object indicates to which entity this response belongs


status string
A payment address can have two statuses, as mentioned below.

  • active
  • Upon generation, by default, it will be active until deactivated.
  • deactivated
  • You can manually deactivate the payment address when you don't intend to get paid via it.

currency string
The default currency is set to SATS.


payment_request string
This attribute represents an unique LNURL-encoded payment request, enabling users and applications to effortlessly initiate Lightning Network payments.


username string
This attribute represents a unique username defined by you to create a payment address.


domain string
This attribute refers to either a custom domain added or the default speed domain used to create a payment address.


address string
This attribute represents a composite value that consists of a distinct username and a customized domain or default speed domain.


success_message string
Message customers will see when they make payment via their preferred wallet.


success_url string
If the payment is successful, the customer will be shown the URL in their wallet, if defined.


created timestamp
Time at which the payment address was created.


modified timestamp
Time at which the last modification was made.