NullPay
  1. Transaction
NullPay
  • Private
    • Transaction
      • Transaction History
        GET
      • Create Transaction
        POST
      • Transaction Detail
        GET
    • Merchant
      • Balances
      • Coin Settings
      • Update Coin Settings
    • Withdraw
      • Withdrawal History
      • Withdraw
      • Fiat Withdraw
  • Public
    • Health Check
      GET
    • Get Coins
      GET
    • Get Currencies
      GET
  • IPN Webhooks
    • IPN Handler
      POST
  1. Transaction

Create Transaction

POST
/api/v1/p/transaction
Create a transaction with the given payload. If you preselect coin, you must provide the coin id which is listed in public coin api. The response fields can be different according to coin selection status.

Request

Header Params

Body Params application/json

Example
{
    "productName": "Product Name",
    "productCount": "1",
    "productPrice": "1.00",
    "productCurrency": "USD",
    "coinId": 1,
    "buyerEmail": "buyer@nullpay.net",
    "redirectUrl": "https://nullpay.net/redirect",
    "custom": "custom data"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.nullpay.net/api/v1/p/transaction' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productName": "Product Name",
    "productCount": "1",
    "productPrice": "1.00",
    "productCurrency": "USD",
    "coinId": 1,
    "buyerEmail": "buyer@nullpay.net",
    "redirectUrl": "https://nullpay.net/redirect",
    "custom": "custom data"
}'

Responses

🟢201The record has been successfully created.
application/json
Body

Example
{
    "id": "5ae77aaa-b340-41b7-8def-f61811965b1e",
    "productName": "Product Name",
    "productCount": 1,
    "productPrice": 1,
    "productCurrency": "USD",
    "productTotal": 1,
    "totalAmountAsCoin": 1,
    "email": "buyer@nullpay.net",
    "status": "pending",
    "paymentAddress": "0x1234567890",
    "destinationTag": "1234567890",
    "warningText": "Please do not send any other coin to this address.",
    "createdAt": "2021-01-01T00:00:00.000Z",
    "paidAmountAsCoin": 0,
    "merchantName": "Merchant Name",
    "merchantEmail": "support@nullpay.net",
    "merchantUrl": "https://nullpay.net",
    "timeoutAsSecond": 600,
    "selectedCoin": {
        "id": "1",
        "symbol": "BTC",
        "name": "Bitcoin",
        "network": "mainnet",
        "warningText": "Please do not send any other coin to this address.",
        "regex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$",
        "precision": 8
    },
    "paymentUrl": "https://nullpay.net/payment/5ae77aaa-b340-41b7-8def-f61811965b1e"
}
🟠400Bad request, please check the request payload.
🟠401Unauthorized request, please check the API key.
🟠408Request timeout, please try again later.
🟠429Too many requests, please try again later.
Modified at 2024-07-20 10:31:49
Previous
Transaction History
Next
Transaction Detail
Built with