Create Transaction

API POST Fields (in addition to the Main Fields described in the Introduction)

Field NameDescriptionRequired?
Create Fixed-Price Transaction
cmdcreate_transactionYes
amountThe amount of the transaction in the original currency (currency1 below).Yes
currency1The original currency of the transaction.Yes
currency2The currency the buyer will be sending. For example if your products are priced in USD but you are receiving BTC, you would use currency1=USD and currency2=BTC.
currency1 and currency2 can be set to the same thing if you don't need currency conversion.
Yes
buyer_emailSet the buyer's email address. This will let us send them a notice if they underpay or need a refund. We will not add them to our mailing list or spam them or anything like that.Yes
addressOptionally set the address to send the funds to (if not set will use the settings you have set on the 'Coins Acceptance Settings' page).
Remember: this must be an address in currency2's network.
No
buyer_nameOptionally set the buyer's name for your reference.No
item_nameItem name for your reference, will be on the payment information page and in the IPNs for the transaction.No
item_numberItem number for your reference, will be on the payment information page and in the IPNs for the transaction.No
invoiceAnother field for your use, will be on the payment information page and in the IPNs for the transaction.No
customAnother field for your use, will be on the payment information page and in the IPNs for the transaction.No
ipn_urlURL for your IPN callbacks. If not set it will use the IPN URL in your Edit Settings page if you have one set.No

API Response

A successful call to the 'create_transaction' command will give you a result similar to this (JSON):
{
   "error":"ok",
   "result":{
      "amount":"1.00000000",
      "address":"ZZZ",
      "dest_tag":"YYY",
      "txn_id":"XXX",
      "confirms_needed":"10",
      "timeout":9000,
      "status_url":"https:\/\/www.livepay.io\/index.php?cmd=status&id=XXX&key=ZZZ"
      "qrcode_url":"https:\/\/www.livepay.io\/qrgen.php?id=XXX&key=ZZZ"
   }
}
The result wil have the following fields:
  • amount = The amount for the buyer to send in the destination currency (currency2).
  • address = The address the buyer needs to send the coins to.
  • dest_tag = The tag buyers need to attach for the payment to complete. (only included for coins that require them such as XRP/XMR/etc.)
  • txn_id = The LivePay.net transaction ID.
  • confirms_needed = The number of confirms needed for the transaction to be complete.
  • timeout = How long the buyer has to send the coins and have them be confirmed in seconds.
  • status_url = A URL where the buyer can view the payment progress and leave feedback for you.
  • qrcode_url = A URL to a QR code you can display for buyer's paying with a QR supporting wallet.