Transactions

The transaction resource represents a transaction record that has been synchronized from one or many of the Mesh integrations. A transaction models a one time payment of money in return for a good or service.

Transaction records can cannot be created via the Mesh API.

Provider Mapping


Provider Model URL
Stripe charge https://stripe.com/docs/api#charges
Shopify order https://help.shopify.com/api/reference/order

Model


Field Type Description
id string The Mesh identifier for the transaction.
created_at int The original creation date of the transaction.
updated_at int The latest update date for the transaction.
amount int The amount of the transaction.
currency string The currency for the transaction.
user_id string The users_id to which the transaction is associated.
description string The description for the transaction.
origin string The origin of the transaction.
provider_id string The provider identifier for the transaction.
url string The URL for the transaction.

Get Transaction


Fetches a single transaction record.

Request

GET http://api.meshdata.io/apps/{app_id}/transactions/{transaction}

Response

HTTP/1.1 200 OK
{
    "amount": 1000,
    "currency": "USD",
    "created_at" : 1243435434543,
    "description": "This is a great transaction",
    "id": "56a1c9715decd82dd00dfa62",
    "origin": "stripe",
    "provider_id": "ch_18SuuBLr8jD4CYuzrF5yAKfX",
    "updated_at" : 1243435434543,
    "url": "https://dashboard.stripe.com/payments/ch_18SuuBLr8jD4CYuzrF5yAKfX"
    "user_id": "90a1c6587decd23dd00dfa33"
}

Get Transactions


Fetches multiple transaction records.

Request

GET http://api.meshdata.io/apps/{app_id}/transactions

Response

HTTP/1.1 200 OK
{
    "transactions" : [
        {
            "amount": 1000,
            "currency": "USD",
            "created_at" : 1243435434543,
            "description": "This is a great transaction",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "stripe",
            "provider_id": "ch_18SuuBLr8jD4CYuzrF5yAKfX",
            "updated_at" : 1243435434543,
            "url": "https://dashboard.stripe.com/payments/ch_18SuuBLr8jD4CYuzrF5yAKfX"
            "user_id": "90a1c6587decd23dd00dfa33"
        },
        {...}
    ]
}

Get Transactions for User


Fetches all transaction records associated with the supplied user_id.

Request

GET http://api.meshdata.io/apps/{app_id}/transactions/{transaction_id}?user_id={user_id}

Response

HTTP/1.1 200 OK
{
    "transactions" : [
        {
            "amount": 1000,
            "currency": "USD",
            "created_at" : 1243435434543,
            "description": "This is a great transaction",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "stripe",
            "provider_id": "ch_18SuuBLr8jD4CYuzrF5yAKfX",
            "updated_at" : 1243435434543,
            "url": "https://dashboard.stripe.com/payments/ch_18SuuBLr8jD4CYuzrF5yAKfX"
            "user_id": "90a1c6587decd23dd00dfa33"
        },
        {...}
    ]
}

Get Transactions for Organization


Fetches all transaction records associated with organization_id. Transactions are associated with an organization through a user record.

Request

GET http://api.meshdata.io/apps/{app_id}/transactions/{transaction_id}?organization_id={organization_id}

Response

HTTP/1.1 200 OK
{
    "transactions" : [
        {
            "amount": 1000,
            "currency": "USD",
            "created_at" : 1243435434543,
            "description": "This is a great transaction",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "stripe",
            "provider_id": "ch_18SuuBLr8jD4CYuzrF5yAKfX",
            "updated_at" : 1243435434543,
            "url": "https://dashboard.stripe.com/payments/ch_18SuuBLr8jD4CYuzrF5yAKfX"
            "user_id": "90a1c6587decd23dd00dfa33"
        },
        {...}
    ]
}

results matching ""

    No results matching ""