token_transaction.php

Verifies an SPL token transaction and the amount of tokens sent

Verifies the details of an SPL token transaction made through SOL Pay

GET https://solpay.togatech.org/transaction.php

The transaction endpoint takes in three parameters: to, txid, and token. The to parameter is for the recipient address, the txid is for the transaction signature (which can be obtained through one of the following transaction functions: sendTokensDecimal, sendTokens, signTransaction), and the token is for the token mint address. The endpoint returns the sender address and the number of tokens sent (in both decimal and integer form).

Query Parameters

{
    "status": "success",
    "transaction": {
        "amount": 10000,
        "amount_decimal": 1.0e-5,
        "decimals": 9,
        "from": "SENDER_ADDRESS"
    }
}

Example Request:

https://solpay.togatech.org/token_transaction.php?to=RECIPIENT_ADDRESS&txid=TRANSACTION_SIGNATURE&token=TOKEN_ADDRESS&network=mainnet-beta

Last updated