issued card that results in funds entering or leaving * your Stripe account, such as a completed purchase or refund, is represented by an Issuing * Transaction object. * * Related guide: Issued card transactions * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit. * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. * @property null|string|\Stripe\Issuing\Authorization $authorization The Authorization object that led to this transaction. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction associated with this transaction. * @property string|\Stripe\Issuing\Card $card The card used to make this transaction. * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency. * @property string $merchant_currency The currency with which the merchant is taking payment. * @property \Stripe\StripeObject $merchant_data * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|\Stripe\StripeObject $network_data Details about the transaction, such as processing dates, set by the card network. * @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. * @property null|string|\Stripe\Issuing\Token $token Token object used for this transaction. If a network token was not used for this transaction, this field will be null. * @property null|\Stripe\StripeObject $treasury Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts * @property string $type The nature of the transaction. * @property null|string $wallet The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. */ class Transaction extends \Stripe\ApiResource { const OBJECT_NAME = 'issuing.transaction'; use \Stripe\ApiOperations\Update; const TYPE_CAPTURE = 'capture'; const TYPE_REFUND = 'refund'; const WALLET_APPLE_PAY = 'apple_pay'; const WALLET_GOOGLE_PAY = 'google_pay'; const WALLET_SAMSUNG_PAY = 'samsung_pay'; /** * Returns a list of Issuing Transaction objects. The objects are * sorted in descending order by creation date, with the most recently created * object appearing first. * * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\Issuing\Transaction> of ApiResources */ public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); } /** * Retrieves an Issuing Transaction object. * * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Issuing\Transaction */ public static function retrieve($id, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; } /** * Updates the specified Issuing Transaction object by setting the * values of the parameters passed. Any parameters not provided will be left * unchanged. * * @param string $id the ID of the resource to update * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Issuing\Transaction the updated resource */ public static function update($id, $params = null, $opts = null) { self::_validateParams($params); $url = static::resourceUrl($id); list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; } }