2.0.21 • Published 4 years ago

@ppay/ipn v2.0.21

Weekly downloads
4
License
ISC
Repository
-
Last release
4 years ago

Status Types:

0 (PENDING) – transaction has been registered within blockchain and included into a block, but is yet to receive a necessary amount of confirmations;

1 (PAID) – transaction has received 1 confirmation (for withdrawals) or 3 confirmations + payment to balance (for deposits);

2 (PAYMENT PROCESSING) – (used for timed payments made via Merchant page) transaction from user has not been registered yet;

3 (FAILURE) — can occur in such cases:

  1. insufficient funds in transaction made by user via Merchant page;
  2. timer on the Merchant page has ended with status(2) transaction;
  3. failed withdrawal attempt, transaction has not reached the blockchain;

4 (UNDERPAYMENT) – DEPRECATED

5 (QUEUED) – withdrawal transaction will be created according to the queue order (next possible status: (0) or(3)).

Retry Attempts & Interval

System has 24 attempts to send a transaction, with a 5 minute interval between the attempts.

Metadata Field

You can insert any info of choice into these fields, don't forget to encode it into base64.

Definitions & Parameters

Here, MO means Merchant Owner, User means Merchant owner's user

payINFO_FIELD — amount to be received by MO to the Dashboard, before forwarding to the merchant page (Example: price of goods in the cart). profit - amount to be accrued after fees; necessaryINFO_FIELD — amount of fees to be paid in order to receive pay accrual. received – summary of transactions received. In case of payments made via the Merchant page, one payment may include multiple transactions and this field will display their summary. In case of Pending transaction status, this field will display 0 or summary of confirmed transactions. receivedPending – summary of all transactions to the address registered by the system, not depending on amount of confirmations. receivedPay – final amount to be paid to the User, including all fees. When accruing funds to user's balance, check this field carefully, as it contains ultimate info about User's payment.

When using PermanentAddress functionality, it is necessary to use receivedPay field.

Code Example

{
                "kind" : "ReplenishPayment",
                "orderId" : "159779087103391464841531",
                "merchantName" : "example",
                "fee" : {
                    "system" : "0.005",
                    "merchant" : "0"
                },
                "status" : 0,
                "currency" : "ETH",
                "meta" : "yyjy1WZJZcI6IkxxLNENSIn0=",
                "to" : "0x22263e37273e7f9B58c48C015bDC3414DA9f4a85",
                "transactions" : [
                    {
                        "confirmations" : 1,
                        "hash" : "0xb7f238eEEe6212d41cb8da97db8bc69a87ab0ce83bce3e8e1c538c965a4a8fe0",
                        "amount" : "0.56905117",
                        "id" : "5f3c5a974ce687010db06e84"
                    }
                ],
                "amount" : {
                    "pay" : "0",
                    "profit" : "0",
                    "necessary" : "0",
                    "received" : "0",
                    "receivedPay" : "0",
                    "receivedPending" : "0.56905117"
                },
{
                "kind" : "WithdrawPayment",
                "orderId" : "157010161960852885627261",
                "merchantName" : "example",
                "fee" : {
                    "system" : "0.005"
                },
                "status" : 0,
                "currency" : "ETH",
                "meta" : "yyjy1WZJZcI6IkxxLNENSIn0=",
                "to" : "0x22263e37273e7f9B58c48C015bDC3414DA9f4a85",
                "transactions" : [
                    {
                        "confirmations" : 0,
                        "hash" : "0xe4b4090179db4523ad5034b9374165BBA75fa3558f71a7a4e82a9511871666e5",
                        "amount" : "0.0001",
                        "fee" : "0.000640395",
                        "id" : "5d95d973e4888c6dc87d04c0"
                    }
                ],
                "amount" : "0.0001"
            },
2.0.20

4 years ago

2.0.21

4 years ago

2.0.19

4 years ago

2.0.16

4 years ago

2.0.17

4 years ago

2.0.18

4 years ago

2.0.15

4 years ago

2.0.14

4 years ago

2.0.13

4 years ago

2.0.11

4 years ago

2.0.10

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.3

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago