View Source ExOAPI.Stripe.SDK.Transfers (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.</p>

description: <p>You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the <code>limit</code> and <code>starting_after</code> parameters to page through additional reversals.</p>

description: <p>Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.</p>

description: <p>By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.</p>

description: <p>To send funds from your Stripe account to a connected account, you create a new transfer object. Your <a href="#balance">Stripe balance</a> must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.</p>

description: <p>When you create a new reversal, you must specify a transfer to create it on.</p>

description: <p>Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

description: <p>Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

Link to this section Types

Link to this type

get_transfers_id_reversals_opts()

View Source
@type get_transfers_id_reversals_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
@type get_transfers_opts() ::
  {:transfer_group, String.t()}
  | {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:destination, String.t()}
  | {:created, String.t()}
Link to this type

get_transfers_transfer_opts()

View Source
@type get_transfers_transfer_opts() :: {:expand, String.t()}
Link to this type

get_transfers_transfer_reversals_id_opts()

View Source
@type get_transfers_transfer_reversals_id_opts() :: {:expand, String.t()}

Link to this section Functions

Link to this function

get_transfers(client, opts \\ [])

View Source
@spec get_transfers(client :: ExOAPI.Client.t(), [get_transfers_opts()]) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.Transfer.t()]
     }
   | map()}
  | {:error, any()}

description: <p>Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.</p>

Link to this function

get_transfers_id_reversals(client, id, opts \\ [])

View Source
@spec get_transfers_id_reversals(
  client :: ExOAPI.Client.t(),
  id :: String.t(),
  [get_transfers_id_reversals_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.TransferReversal.t()]
     }
   | map()}
  | {:error, any()}

description: <p>You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the <code>limit</code> and <code>starting_after</code> parameters to page through additional reversals.</p>

Link to this function

get_transfers_transfer(client, transfer, opts \\ [])

View Source
@spec get_transfers_transfer(
  client :: ExOAPI.Client.t(),
  transfer :: String.t(),
  [get_transfers_transfer_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Transfer.t() | map()}
  | {:error, any()}

description: <p>Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.</p>

Link to this function

get_transfers_transfer_reversals_id(client, transfer, id, opts \\ [])

View Source
@spec get_transfers_transfer_reversals_id(
  client :: ExOAPI.Client.t(),
  transfer :: String.t(),
  id :: String.t(),
  [get_transfers_transfer_reversals_id_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TransferReversal.t()
   | map()}
  | {:error, any()}

description: <p>By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.</p>

Link to this function

post_transfers(client, body)

View Source
@spec post_transfers(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      transfer_group: String.t(),
      source_type: String.t() | :bank_account | :card | :fpx,
      source_transaction: String.t(),
      metadata: map(),
      expand: [String.t()],
      destination: String.t(),
      description: String.t(),
      currency: String.t(),
      amount: integer()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Transfer.t() | map()}
  | {:error, any()}

description: <p>To send funds from your Stripe account to a connected account, you create a new transfer object. Your <a href="#balance">Stripe balance</a> must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.</p>

Link to this function

post_transfers_id_reversals(client, body, id)

View Source
@spec post_transfers_id_reversals(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      refund_application_fee: boolean(),
      metadata: String.t() | map(),
      expand: [String.t()],
      description: String.t(),
      amount: integer()
    }
    | map(),
  id :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TransferReversal.t()
   | map()}
  | {:error, any()}

description: <p>When you create a new reversal, you must specify a transfer to create it on.</p>

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

Link to this function

post_transfers_transfer(client, body, transfer)

View Source
@spec post_transfers_transfer(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      metadata: String.t() | map(),
      expand: [String.t()],
      description: String.t()
    }
    | map(),
  transfer :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Transfer.t() | map()}
  | {:error, any()}

description: <p>Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

This request accepts only metadata as an argument.

Link to this function

post_transfers_transfer_reversals_id(client, body, transfer, id)

View Source
@spec post_transfers_transfer_reversals_id(
  client :: ExOAPI.Client.t(),
  body :: %{metadata: String.t() | map(), expand: [String.t()]} | map(),
  transfer :: String.t(),
  id :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TransferReversal.t()
   | map()}
  | {:error, any()}

description: <p>Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

This request only accepts metadata and description as arguments.