Money Button Documentation

Money Button Documentation

  • Money Button
  • API
  • Examples
  • Paymail
  • bsv

›API v1

Money Button

  • Money Button Overview
  • HTML
  • Javascript
  • React
  • Crypto Operations
  • Invisible Money Button
  • Paymail Signatures
  • Paymail Encryption
  • Simple Fabriik Protocol for Tokens

API

  • API Overview
  • Apps
  • Webhooks
  • Tokens
  • Currencies
  • Javascript Client
  • Authentication

    • Authentication Overview
    • OAuth
    • OAuth With JS Client

    API v1

    • Get User Identity
    • Get User Profile
    • Get User Balance
    • Get Payments
    • Get Payment By ID

    API v2

    • Get User Balances
    • Get Payments
    • Get Payment By ID
    • Get Assets
    • Create Asset
    • Modify Asset

Examples

  • Examples Overview
  • OP_RETURN Scripts
  • Assets

Paymail

  • Paymail Overview
  • Paymail Video Series
  • Paymail Introduction
  • BRFC Specifications
  • Specification Documents
  • BRFC ID Assignment
  • Service Discovery
  • Host Discovery
  • Capability Discovery
  • Public Key Infrastructure
  • Payment Addressing
  • Payment Addressing (Basic Address Resolution)
  • Payment Addressing (Payer Validation)
  • Payment Addressing (Payee Approvals)
  • Payment Addressing (PayTo Protocol Prefix)
  • Verify Public Key Owner
  • P2P Transactions
  • P2P Payment Destination
  • Recommendations

Bitcoin SV Library (bsv)

  • Bitcoin SV Library (bsv)
  • Big Numbers
  • Points (Elliptic Curves)
  • Hash Functions
  • Base 58
  • Private Keys
  • Public Keys
  • Addresses
  • ECDSA
  • Bitcoin Signed Messages
  • Signatures
  • HD Private Keys (BIP32)
  • HD Public Keys (BIP32)
  • Mnemonics (BIP39)
  • Script

Get Payment By ID

Retrieves the data related to a specific payment.

Facts

AttributeValue
urlhttps://www.moneybutton.com/api/v1/payments/{paymentId}
http verbGET
Required scopepayments:read or application_access:write

Attributes

URL

  • paymentId: The id of the required payment. This is not a txid, it's a Money Button id for the payment object.

Response

{
  "included": [
    {
      "type": "payment-outputs",
      "id": "80",
      "attributes": {
        "created-at": "2019-08-21T21:35:14.233Z",
        "to": "5",
        "amount": "1",
        "currency": "USD",
        "satoshis": "746676",
        "type": "USER",
        "user-id": "5",
        "address": null,
        "script": null,
        "amount-usd": "1",
        "user-paymail": "johndoe@example.com"
      }
    }
  ],
  "data": {
    "type": "payments",
    "id": "75",
    "attributes": {
      "created-at": "2019-08-21T21:35:14.229Z",
      "user-id": "7",
      "txid": "79cdd6f7649e9ca0a63e065cde3f4f5fdd6f3012eccfbea1f0e031b91a46cf54",
      "normalized-txid": "b27a07a739bc633f73ae47b9956269d342a42491b60f0ee326c65dec869855c9",
      "amount": "0.9999997399525015",
      "currency": "USD",
      "satoshis": "746676",
      "status": "COMPLETED",
      "status-description": null,
      "button-id": "1566423247979",
      "button-data": "{\"productId\":\"ac754t6\"}",
      "amount-usd": "0.9999997399525015",
      "input-amount-usd": "123.91680720810011",
      "input-amount-satoshis": "92525730",
      "spend-amount-usd": "1.0005073227614334",
      "spend-amount-satoshis": "747055",
      "fee-amount-usd": "0.00050758280893185",
      "fee-amount-satoshis": "379",
      "change-amount-usd": "122.91629988533867",
      "change-amount-satoshis": "91778675"
    },
    "relationships": {
      "payment-outputs": {
        "data": [
          {
            "type": "payment-outputs",
            "id": "80"
          }
        ]
      }
    }
  }
}

Using our js api client

const mbClient = new MoneyButtonClient(CLIENT_IDENTIFIER, CLIENT_SECRET)
await mbClient.logInAsApp()
const payments = await mbClient.getPaymentById(75)
console.log('The txid is: ', payments.txid)
// Output:
// The txid is: 79cdd6f7649e9ca0a63e065cde3f4f5fdd6f3012eccfbea1f0e031b91a46cf54
← Get PaymentsGet User Balances →
  • Facts
  • Attributes
    • URL
  • Response
  • Using our js api client
Money Button Documentation
Docs
Money ButtonAPIDesignbsv
Community
redditYoutubeTelegramTwitter
More
BlogInstagramGitHubStar
See an error in our documentation? Issue a pull request to fix it.
Copyright © 2021 Yours Inc.