The payrequest object

To accept multiple payments using a single payment payload generated by Speed, you can use payrequest. This service generates LNurl Pay (Lightning) or On-chain (Bitcoin) address payment payload, which your customers can use to make multiple payments by scanning a QR code created from that payload.

Once your customers pay using payrequest, internally system create a payment and marked it as paid, associated with payrequest. This association helps you keep track of which payments are made through payrequest. Moreover, if you're associated to any other Speed account, then, as a platform account you can create a payrequest in any of your connected account.

Below is the request object of Payrequest with an explanation of all parameters.

{
  "id": "pr_xxxxxxxxxxxxxxxxxxxxxxxxxx",
  "object": "pay_request",
  "status": "active",
  "type": "lnurl",
  "min_amount": 1,
  "max_amount": 500000000,
  "expected_currency": null,
  "max_uses": 0,
  "address": null,
  "url": "https://appapi.tryspeed.com/lnurl?q=92aef8877104823ffb79b54f96d6cc38d22944fa1ee",
  "secret": "92aef8877104823ffb73871f53gfegjhdelfigjecc38d22944fa1ee",
  "encoded": "lnurl1dp68gurn8ghj7ctswpshq6fww3e8jumsv4jkgtnrdakj7mrww4exc0m385unyct9vcursdehxycrgwpjxdnxvc3hxvurwvtxx5enwryxgerjdp5vesnzet90tm3f8",
  "success_url": null,
  "success_message": null,
  "statement_descriptor": null,
  "created": 1676626833155,
  "modified": 1676626833155
}

Attributes


id string
Unique identifier for the object.


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


status string
Payrequest can have 2 statuses, as mentioned below:

    active
Payrequest is active after its generation until it is deactivated.
deactivated
You can manually deactivate a payrequest if you no longer wish to get paid via it.


type string
Both onchain and lnurl methods can be used to receive funds. This indicates the payrequest method (lnurlor onchain) used to send funds through this payrequest.


min_amount BigInteger
This is the minimum amount you will receive through this payrequest.


max_amount BigInteger
This is the maximum amount you will receive through this payrequest.


expected_currency string
Your customer will make a payment in SATS/BTC. However, you can specify the expected currency (fiat or cryptocurrency) in which you would like to store the conversion of the payment made by your customers in SATS.


max_uses BigInteger
This is the maximum number of payments that can be received through this payrequest. Here 0 means an infinite number of payments can be received.


address string
If the method type is onchain, this indicates the Bitcoin wallet address to which the payment is sent. If not, it is null.


url string
If the method type is lnurl, this indicates the url which is derived from decoding the lnurl. If not, it is null.


secret string
If the method type is lnurl, this indicates the secret derived from the url. If not, it is null.


encoded string
If the method type is lnurl, this indicates the lnurl that your customer can use to send funds. If not, it is null.


statement_descriptor string
Additional information about a payment made to an account using this payrequest.


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


success_url string
Customers will see this clickable link in their wallet if the transaction goes through successfully.


created timestamp
Time at which the payrequest object was created.


modified timestamp
Time at which the last modification was made.