The payment link object

A payment link is a shareable URL that can be used to take multiple payment on same link. A payment link can be shared and used multiple times to accept payment from your customers. You can create a payment link in your preferred base currency to be paid in cryptocurrency supported by the Speed platform API (currently SATS).

When a customer visits the payment link URL, it will open a new checkout session, rendering a payment page with information such as payment QR code, email, phone number, billing address or shipping address, and branding details. You can also collect specific details through customizable "custom_fields" where you can add "custom_fields" specifying any of the input types, i.e., text, number, or options. If so, the customer needs to provide them in order for the QR to be shown to them before the payment is processed. Upon receiving the funds either through on-chain or lightning network payment methods, the status of the payment associated with that checkout session changes to paid. To ensure that you can receive both on-chain and lightning payments, remember to keep the “BTC On-chain” payment method enabled in payment methods in Speed web application.

You can use these checkout sessions to track payments through the payment links.

{
    "id": "plink_xxxxxxxxxxxx",
    "object": "payment.link",
    "livemode": false,
    "status": "active",
    "url": "https://buy.tryspeed.com/plink_xxxxxxxxxxxx",
    "currency": "SATS",
    "amount": 10,
    "target_currency": "SATS",
    "statement_descriptor": null,
    "success_url": null,
    "success_message": null,
    "metadata": {},
    "cashback": null,
    "title": null,
    "title_description": null,
    "title_image": null,
    "type": "fixed",
    "customer_collections_status": {
        "is_email_enabled": true,
        "is_phone_enabled": true,
        "is_billing_address_enabled": true,
        "is_shipping_address_enabled": false
    },
    "custom_fields": [
    {
      "id": "cf_live_xxxxxxxxxx",
      "type": "dropdown",
      "label": "state",
      "options": [
        "California",
        "Texas",
        "Florida"
      ],
      "is_optional": false
    },
    {
      "id": "cf_live_xxxxxxxxxx",
      "type": "number",
      "label": "zip code",
      "is_optional": false
    },
    {
      "id": "cf_live_xxxxxxxxxx",
      "type": "text",
      "label": "Will you by our product again?",
      "is_optional": true
    }
  ],
    "created": 1697625415284,
    "modified": 1697625415284
}

Attributes


id string
Unique identifier for the object.


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


livemode boolean
If the object is in live mode, it has the value true; otherwise, it has the value false.


status string
A payment link can have 2 statuses as mentioned below.

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

url string
The public URL that can be shared with your customers to receive payments.


currency string
Your preferred currency (base currency) in which you want to create a payment link.


amount BigDecimal
Total amount for which the payment link was created.


target_currency string
The cryptocurrency in which you want to receive payment from your customer. As of now, Speed only supports SATS.


type string
This attribute specifies the preferred payment method for customers. It can be anyone of “fixed” (set by system), "options" or "preset".


preset object
This attribute specifies min_amount and max_amount for your customers, ensuring that the payment falls within the limits you've defined.


options array of strings
This allows the customers to choose from a predefined list of payment values, making the process convenient and efficient.


statement_descriptor string
Additional information about a payment made to an account via this payment link.


success_url string
If the payment is successful, the customer will be redirected to this URL.


success_message string
Message customers will see when they make payment via their wallet. Success_url and success-message are mutually exclusive request parameters—only one of them can be used.


title string
This attribute represents the header or title of the payment page.


title_description string
This attribute represents additional information about your payment page.


title_image string
Represents a public URL consisting of an image illustrating the purpose of a payment page along with the title and description.

Users won't see the image on payment page if the image path is removed or deleted after the payment link is created.


metadata object
You can use this to store additional information about the object in a structured format.


cashback object
You can use this parameter to associate an active cashback with a payment link.

  • id string
  • Unique identifier for the cashback object.

customer_collections_status object
This object represents the options that need to be filled by the customer before processing the payment. These options can be email, phone number, billing address, or shipping address.

  • is_phone_enabled
  • If true customer needs to provide a phone number before processing the payment.
  • is_email_enabled
  • If true customer needs to provide an email address before processing the payment.
  • is_billing_address_enabled
  • If true customer needs to provide a billing address before processing the payment.
  • is_shipping_address_enabled
  • If true customer needs to provide a shipping address before processing the payment.

custom_fields array of objects
This attribute represents whether customize information from your customer needed or not during the payment process. Whether you need textual input, numerical data, or selections from a dropdown menu, this object empowers you to tailor the payment experience as per your unique requirement.


created timestamp
Time at which the payment link was created.


modified timestamp
Time at which the last modification was made.