RESTful API || Transaction Reporting

The Transaction Reporting endpoint of the @Pay RESTful API allows you to retrieve information on completed transactions.


Authentication

Authentication is done with HTTP Token Authenication using an organization's @Pay private key. This can be found by logging into the organization's @Pay dashboard and navigating to the 'API Settings' page, which is found under 'Settings' in the main menu in the upper right of the dashboard. Also note that the private key must be percent/URL encoded.

Operations

Retrieve transactions

Attribute Description
ORGANIZATION_PRIVATE_KEY The organization's URL encoded private key found in the organization's dashboard under 'Settings' -> 'API Settings'.
ORGANIZATION_SID The SID of the organization. Found in the organization's dashboard under 'Settings' -> 'API Settings'. Should begin with 'org_'.
LIMIT (optional) An integer indicating the number of transactions you'd like to retrieve. If this is not provided, all transactions will be returned.
AFTER (optional) A Unix timestamp. If provided, only transactions that occurred after the timestamp will be returned.
Field Description
id A string that uniquely identifies this transaction in @Pay's system.
date A formatted timestamp of when this transaction was created.
timestamp A Unix timestamp of when this transaction was created.
offer_name A written description of the transaction. Often takes the format of "Payment of $X.XX to ORGANIZATION_NAME".
email The email address associated with thsi transaction.
amount A floating point representation of the amount of this transaction in dollars.
net_amount A floating point representation of the amount of this transaction in dollars less any processing fees.
status The status of this transaction. Can be either "Successful", meaning the transaction was processed without problems, "Failed", meaning we were able to process the transaction, often because of card issues (such as a decline), or "Further Action Required", meaning we required additional information to process the transaction (such as a payment method) and never received it.

Batching

Transactions are returned in ascending chronological order, so transactions can be retrieved in batches by first making a request specifying only a LIMIT parameter and then, for future transactions, specifying an AFTER paramter of n + 1, where n is the timestamp of the last transaction you have received.

Polling

A similar method can be used for polling the API for new transactions. Simply use an AFTER parameter of n + 1, where n is the timestamp of the last transaction you have on record.