ScribePay
  • Welcome
  • Getting Started
    • Quickstart
  • Basics
    • Chains
      • Mainnet
      • Testnet
    • SDK
    • APIs
    • Register Business
    • How it Works
Powered by GitBook
On this page
  1. Basics

APIs

ScribePay api have a purpose provide data out of the system to make like easy of business owners.

PreviousSDKNextRegister Business

Last updated 4 months ago

ScribPay provide external api for external system to show transactions these apis requires api-key which is free to create from after creating the business.

Returns transaction data associated with the business linked to the provided API key.

GET Transactions:

`https://api.scribepay.org/api/transaction?buyerWallet=0xd00faF7c2a837DC457389758Ea1271aE6256dc44&token=0x0000000000000000000000000000000000000000&chain=1&txStatus=SUCCESS&tx=0xacca8dc156d36db1d7642cc380d36117aaec2e073d1051e7718b2ea2ddea3e00&expectedDelivery=1735490149`

Parameter
Description

buyerWallet

OptionalWallet addressof the consumer with which the item has been purchased

token

OptionalToken address of currency by which transaction took place

chain

OptionalChain idof the network where transaction has happened

txStatus

OptionalCurrent status of the transaction Note:It's possible status not update if the transaction hasn't been synced by the merchant from business panel

tx

OptionalHash of the transaction

expectedDelivery

OptionalDelivery time provided by business

Note: Status is case sensitive user may need to provide SUCCESS, PENDING or FAIL in all uppercase letters.

Parameter
Description

x-api-key

Required API key can be obtained from business panel, each business have their own.

Sample Response

{
    "status": "success",
    "data": {
        "docs": [
            {
                "_id": "67717a00bef5718c7ab46845",
                "txStatus": "SUCCESS",
                "productIndex": 0,
                "tx": "0xacca8dc156d36db1d7642cc380d36117aaec2e073d1051e7718b2ea2ddea3e00",
                "buyerWallet": "0xd00faf7c2a837dc457389758ea1271ae6256dc44",
                "expectedDelivery": 1735490149,
                "amount": 0.01,
                "token": "0x0000000000000000000000000000000000000000",
                "chain": 80002,
                "createdAt": "2024-12-29T16:34:09.023Z",
                "updatedAt": "2024-12-29T16:46:06.351Z",
                "id": "67717a00bef5718c7ab46845"
            }
        ],
        "totalDocs": 2,
        "limit": 10,
        "totalPages": 1,
        "page": 1,
        "pagingCounter": 1,
        "hasPrevPage": false,
        "hasNextPage": false,
        "prevPage": null,
        "nextPage": null
    }
}

ScribePay