Skip to main content
Receiving Payments
Updated over a month ago

Create Transaction


API POST Fields

In addition to the Main Fields described in the API Basics > Introduction

Create Fixed-Price Transaction

Field Name

Description

Required?

cmd

create_transaction

Yes

amount

The amount of the transaction in the original currency (currency1 below).

Yes

currency1

The original currency of the transaction.

Yes

currency2

The 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_email

Set 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

address

Optionally 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_name

Optionally set the buyer's name for your reference.

No

item_name

Item name for your reference, will be on the payment information page and in the IPNs for the transaction.

No

item_number

Item number for your reference, will be on the payment information page and in the IPNs for the transaction.

No

invoice

Another field for your use, will be on the payment information page and in the IPNs for the transaction.

No

custom

Another field for your use, will be on the payment information page and in the IPNs for the transaction.

No

ipn_url

URL for your IPN callbacks. If not set it will use the IPN URL in your Edit Settings page if you have one set.

Yes

success_url

Sets a URL to go to if the buyer does complete payment. (Only if you use the returned 'checkout_url', no effect/need if designing your own checkout page.)

No

cancel_url

Sets a URL to go to if the buyer does not complete payment. (Only if you use the returned 'checkout_url', no effect/need if designing your own checkout page.)

No

Method:


API Response

A successful call to get 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,
"checkout_url":"https:\/\/www.WallexPay.com\/index.php?cmd=checkout&id=XXX&key=ZZZ""qrcode_url":"https:\/\/www.WallexPay.com\/qrgen.php?id=XXX&key=ZZZ"
}
}

The result will 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 WallexPay.com 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.

  • checkout_url = While normally you would be designing the full checkout experience on your site you can use this URL to provide the final payment page to the buyer.

  • status_url = A longer-term URL where the buyer can view the payment status and leave feedback for you. This would typically be emailed to the buyer.

  • qrcode_url = A URL to a QR code you can display for buyer's paying with a QR supporting wallet.

Note: This API is for making your own custom checkout page so buyers don't have to leave your website to complete payment. 99% of the time you don't need the extra complexity and would just use a Simple or Advanced button which you can find in our Merchant Tools section.


Get TX Info


API POST Fields

In addition to the Main Fields described in the API Basics > Introduction

Get Multiple Transaction Information

Field Name

Description

Required?

cmd

get_tx_info_multi

Yes

txid

Lets you query up to 25 transaction ID(s) (API key must belong to the seller.) Transaction IDs should be separated with a | (pipe symbol.) Note: It is recommended to handle IPNs instead of using this command when possible, it is more efficient and places less load on our servers.

Yes

Get Transaction Information

Field Name

Description

Required?

cmd

get_tx_info

Yes

txid

The transaction ID to query (API key must belong to the seller.) Note: It is recommended to handle IPNs instead of using this command when possible, it is more efficient and places less load on our servers.

Yes

full

Set to 1 to also include the raw checkout and shipping data for the payment if available. (default: 0)

No

Method:

API Response

A successful call to the 'get_tx_info' command will give you a result similar to this (JSON):

- Example Unavailable -

Note: If possible, you should use the Instant Payment Notification (IPN) system to receive notifications about payments rather than using this polled interface.

Note: If possible, you should use the Instant Payment Notification (IPN) system to receive notifications about payments rather than using this polled interface.


Get TX List


API POST Fields

In addition to the Main Fields described in the API Basics > Introduction

Get Transaction IDs

Field Name

Description

Required?

cmd

get_tx_ids

Yes

limit

The maximum number of transaction IDs to return from 1-100. (default: 25)

No

start

What transaction # to start from (for iteration/pagination.) (default: 0, starts with your newest transactions.)

No

all

By default we return an array of TX IDs where you are the seller for use with get_tx_info_multi or get_tx_info. If all is set to 1 returns an array with TX IDs and whether you are the seller or buyer for the transaction.

No

Method:

API Response

A successful call to get the 'get_tx_ids' command will give you a result similar to this (JSON):

- Example Unavailable -

Note: If possible, you should use the Instant Payment Notification (IPN) system to receive notifications about payments rather than using this polled interface.

Did this answer your question?