BalanceTransaction.php 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe;
  4. /**
  5. * Balance transactions represent funds moving through your Stripe account. They're
  6. * created for every type of transaction that comes into or flows out of your
  7. * Stripe account balance.
  8. *
  9. * Related guide: <a
  10. * href="https://stripe.com/docs/reports/balance-transaction-types">Balance
  11. * Transaction Types</a>.
  12. *
  13. * @property string $id Unique identifier for the object.
  14. * @property string $object String representing the object's type. Objects of the same type share the same value.
  15. * @property int $amount Gross amount of the transaction, in %s.
  16. * @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
  17. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
  18. * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
  19. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
  20. * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the <code>amount</code> in currency A, times <code>exchange_rate</code>, would be the <code>amount</code> in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's <code>amount</code> would be <code>1000</code> and <code>currency</code> would be <code>eur</code>. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's <code>amount</code> would be <code>1234</code>, <code>currency</code> would be <code>usd</code>, and <code>exchange_rate</code> would be <code>1.234</code>.
  21. * @property int $fee Fees (in %s) paid for this transaction.
  22. * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
  23. * @property int $net Net amount of the transaction, in %s.
  24. * @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> about how reporting categories can help you understand balance transactions from an accounting perspective.
  25. * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related.
  26. * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either <code>available</code> or <code>pending</code>.
  27. * @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
  28. */
  29. class BalanceTransaction extends ApiResource
  30. {
  31. const OBJECT_NAME = 'balance_transaction';
  32. use ApiOperations\All;
  33. use ApiOperations\Retrieve;
  34. const TYPE_ADJUSTMENT = 'adjustment';
  35. const TYPE_ADVANCE = 'advance';
  36. const TYPE_ADVANCE_FUNDING = 'advance_funding';
  37. const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment';
  38. const TYPE_APPLICATION_FEE = 'application_fee';
  39. const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund';
  40. const TYPE_CHARGE = 'charge';
  41. const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer';
  42. const TYPE_CONTRIBUTION = 'contribution';
  43. const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold';
  44. const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release';
  45. const TYPE_ISSUING_DISPUTE = 'issuing_dispute';
  46. const TYPE_ISSUING_TRANSACTION = 'issuing_transaction';
  47. const TYPE_PAYMENT = 'payment';
  48. const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund';
  49. const TYPE_PAYMENT_REFUND = 'payment_refund';
  50. const TYPE_PAYOUT = 'payout';
  51. const TYPE_PAYOUT_CANCEL = 'payout_cancel';
  52. const TYPE_PAYOUT_FAILURE = 'payout_failure';
  53. const TYPE_REFUND = 'refund';
  54. const TYPE_REFUND_FAILURE = 'refund_failure';
  55. const TYPE_RESERVE_TRANSACTION = 'reserve_transaction';
  56. const TYPE_RESERVED_FUNDS = 'reserved_funds';
  57. const TYPE_STRIPE_FEE = 'stripe_fee';
  58. const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee';
  59. const TYPE_TAX_FEE = 'tax_fee';
  60. const TYPE_TOPUP = 'topup';
  61. const TYPE_TOPUP_REVERSAL = 'topup_reversal';
  62. const TYPE_TRANSFER = 'transfer';
  63. const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
  64. const TYPE_TRANSFER_FAILURE = 'transfer_failure';
  65. const TYPE_TRANSFER_REFUND = 'transfer_refund';
  66. }