public class

StripeBitcoinReceiverClient

extends Object
java.lang.Object
   ↳ com.wsl.modules.stripe.client.StripeBitcoinReceiverClient

Class Overview

Encapsulates Bitcoin Receiver-related Stripe API calls.

Summary

Public Constructors
StripeBitcoinReceiverClient()
Public Methods
BitcoinReceiver createBitcoinReceiver(int amount, String currency, String email, String description, Map<String, Object> metadata, boolean refundMispayments)
Create a BitCoin Receiver Creates a Bitcoin receiver object that can be used to accept bitcoin payments from your customer.
BitcoinReceiverCollection listAllBitcoinReceivers(String active, String endingBefore, String filled, int limit, String startingAfter, String uncapturedFunds)
List All Bitcoin Receivers Returns a list of your receivers.
BitcoinReceiver retrieveBitcoinReceiver(String id)
Retrieve a Bitcoin Receiver Retrieves the Bitcoin receiver with the given ID.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StripeBitcoinReceiverClient ()

Public Methods

public BitcoinReceiver createBitcoinReceiver (int amount, String currency, String email, String description, Map<String, Object> metadata, boolean refundMispayments)

Create a BitCoin Receiver Creates a Bitcoin receiver object that can be used to accept bitcoin payments from your customer. The receiver exposes a Bitcoin address and is created with a bitcoin to USD exchange rate that is valid for 10 minutes.

Parameters
amount The amount of currency that you will be paid
currency The currency to which the bitcoin will be converted. You will be paid out in this currency. Only USD is currently supported.
email The email address of the customer.
description A description of the receiver
metadata A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format.
refundMispayments A flag that indicates whether you would like Stripe to automatically handle refunds for any mispayments to the receiver.
Returns
  • Returns a Bitcoin receiver object if the call succeeded. The returned object will include the Bitcoin address of the receiver and the bitcoin amount required to fill it. The call will throw an error if a currency other than USD or an amount greater than $15,000.00 is specified.
Throws
StripeConnectorException when there is a problem with the Connector

public BitcoinReceiverCollection listAllBitcoinReceivers (String active, String endingBefore, String filled, int limit, String startingAfter, String uncapturedFunds)

List All Bitcoin Receivers Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

Parameters
active Filter for active receivers.
endingBefore A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
filled Filter for filled receivers.
limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
startingAfter A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
uncapturedFunds Filter for receivers with uncaptured funds.
Returns
  • A Map with a data property that contains an array of up to limit Bitcoin receivers, starting after receiver starting_after. Each entry in the array is a separate Bitcoin receiver object. If no more receivers are available, the resulting array will be empty. This request should never throw an error.
Throws
StripeConnectorException when there is a problem with the Connector

public BitcoinReceiver retrieveBitcoinReceiver (String id)

Retrieve a Bitcoin Receiver Retrieves the Bitcoin receiver with the given ID.

Parameters
id The ID of the receiver to retrieve
Returns
  • Returns a Bitcoin receiver if a valid ID was provided. Throws an error otherwise.
Throws
StripeConnectorException when there is a problem with the Connector