Overview

The Purchase object represents a one-time payment of money from a Buyer to your organization.


Methods

POST  /purchase
Create a new purchase.

Body Parameters

buyer
string
required

ID of buyer making the purchase.

items
array
required

Array of items in the purchase, each containing a name, description, amount_in_cents, and quantity info.

user_data
object

User defined data that can be attached to the object. See the User Data page for details.

Example


Properties

id
string

Identifier for this purchase.

buyer
string

ID of buyer making the purchase.

status
string

Status of purchase. One of:

StatusDescription
createdPurchase has been created.
pendingPayment is processing.
settlingPayment is being settled to your operating account.
completedPurchase has finished processing, and payment has been received in your operating account.
errorPurchase has encountered an error.
reversedPurchase has been reversed.
canceledPurchase has been canceled.
refundedPurchase has been refunded.
items
array

Array of items in the purchase, each containing a description, amount_in_cents, and meta data. You are responsible for adding items for tax and shipping, if applicable.

total_in_cents
number

Total amount of the purchase in cents.

fee_in_cents
number

Fee amount of the purchase in cents.

net_total_in_cents
number

Net total amount of the purchase in cents. This amount will be deposited into your operating account.

receipt_pdf_url
string

URL to the receipt PDF for the purchase, once paid.

payment_card_brand
string

Brand of the payment card used for the purchase, if available.

payment_card_last_four
string

Last 4 digits of the payment card used for the purchase, if available.

activity
array

Array of activity log entries for the purchase, each containing an entry and date.

user_data
object

User defined data associated with the purchase.

created_at
string

Date and time when the purchase was created.

updated_at
string

Date and time when the purchase was last updated.