Stripe Treasury Outbound Payment Service (treasury/outbound_payment_service.rb)

stripe-ruby · lib/stripe/services/treasury/outbound_payment_service.rb · ruby · MIT
payments, database, integration, lang:ruby, tag:treasury

Ruby client wrapper for Stripe Treasury outbound payment API: create, retrieve, list, and cancel payments.

# Source: https://github.com/stripe/stripe-ruby | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
# Provided via justclaw.it.com; keep this notice with the code.
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Treasury
    class OutboundPaymentService < StripeService
      # Cancel an OutboundPayment.
      def cancel(id, params = {}, opts = {})
        request(
          method: :post,
          path: format("/v1/treasury/outbound_payments/%<id>s/cancel", { id: CGI.escape(id) }),
          params: params,
          opts: opts,
          base_address: :api
        )
      end

      # Creates an OutboundPayment.
      def create(params = {}, opts = {})
        request(
          method: :post,
          path: "/v1/treasury/outbo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key