Request New Payment

API endpoint:

/v2/payments/new

Request type: POST

Content of the request:

{
  "amount" : 10.00,
  "currency" : "USD",
  "notificationUrl" : "https://example.com/pay",
  "anomalyNotificationUrl" : "https://example.com/anomaly",
  "message" : "Order of flowers and chocolates",
  "merchantTransactionId" : "2015-03-10/123/1",
  "redirectUrls" : {
    "expired": "http://shop.example.com/2015-03-10/123/1/expired",
    "confirmed": "http://shop.example.com/2015-03-10/123/1/confirmed",
    "invalid": "http://shop.example.com/2015-03-10/123/1/invalid",
    "unconfirmed": "http://shop.example.com/2015-03-10/123/1/unconfirmed"
  }
}

Unless otherwise specified parameters are required.

Explanation of the fields:

Name Presence Description
amount Required Amount of currency you are requesting to receive(can be number or string), fo example: "1.00", "1", "99", 1, 1.00, 99
currency Required A ISO 4217 currency code of the currency you are requesting to receive examples: USD, EUR, GBP, AUD, JPY, CAD, ZAR
notificationUrl Required An URL to which the payment notification will be sent. Notification is sent whenever the payment status changes
anomalyNotificationUrl Optional An URL to which the anomaly notification will be sent. Notification is sent whenever new anomaly transaction is detected.
message Required This will be displayed in the customers' Bitcoin wallet application when requesting the payment.
merchantTransactionId Required A identifier for this payment on the merchant side. We will pass this field to you in the POST message when the payment is confirmed.
redirectUrls Optional Redirect URLs to be used together with our Payment Page, see Payment Page for more details

Our response:

{
  "paymentId" : "95bf1d853cf2e040f0ce219221f9b17206525941",
  "amount" : 0.03444190,
  "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
  "label" : "Your store name",
  "message" : "Order of flowers and chocolates",
  "paymentAddress" : "bitcoin:mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN?amount=0.03444190&label=Your+store+name&message=Order+of+flowers+%26+chocolates",
  "expirationTime" : "2018-01-11T11:54:04Z",
  "exchangeRate" : 3299.6271,
  "merchantTransactionId" : "2015-03-10/123/1",
  "paymentPageUrl": "https://payments.bitcoinpaygate.com/95bf1d853cf2e040f0ce219221f9b17206525941"
}

Explanation of the fields:

Name Presence Description
paymentId Required A payment identifier on our side.
amount Required A amount of Bitcoin we are expecting to receive
address Required A Bitcoin address where the payment should be sent
label Required Identifier of the merchant (this is configurable in the dashboard)
message Required Says what the customer is paying for, this is coming from the message field in the payment request
paymentAddress Required A BIP21 formatted URL that is recognized by the customer's Bitcoin wallet
expirationTime Required A String containing a UNIX timestamp in milliseconds format saying when the payment will expire. It can be displayed to the customer
exchangeRate Required Exchange rate that is rounded to 4 decimal places.
merchantTransactionId Required A payment identifier on your side that was passed when requesting a payment
paymentPageUrl Required URL that displays payment information in user-friendly way. This URL can be embedded

This means that we are expecting the 0.03444190 of BTC to be paid to this address mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN

You can also use the paymentAddress field to make a clickable link (this should open a default Bitcoin client installed on the users's computer) or make a QR code that can be scanned using the smartphone with the Bitcoin wallet app installed.