java.lang.Object |
↳ |
com.wsl.modules.stripe.client.StripeTokenClient |
Class Overview
Encapsulates Token-related Stripe API calls.
Summary
Public Methods |
Token
|
createBankAccountToken(String bankAccountId, BankAccount bankAccount)
Create a Bank Account Token
Creates a single use token that wraps the details of a bank account.
|
Token
|
createCardToken(String cardId, Source card, String customer)
Create a Card Token
|
Token
|
retrieveToken(String id)
Retrieve a Token
Retrieves the token with the given ID
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
StripeTokenClient
()
Public Methods
public
Token
createBankAccountToken
(String bankAccountId, BankAccount bankAccount)
Create a Bank Account Token
Creates a single use token that wraps the details of a bank account. This token can be used in place of a bank account Map with any API method. These tokens can only be used once: by attaching them to a recipient.
Parameters
bankAccountId
| The bank account's ID, or... |
bankAccount
| ... Otherwise, if you do not pass a bank account ID, a Map containing a the account details |
Returns
- The created bank account token object is returned if successful. Otherwise, this call throws an error.
public
Token
createCardToken
(String cardId, Source card, String customer)
Parameters
cardId
| The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer... |
card
| ... Otherwise, if you do not pass a customer, a Map containing a user's credit card details |
customer
| For use with Stripe Connect only; this can only be used with an OAuth access token or Stripe-Account header.. For more details, see the shared customers documentation. A customer (owned by the application's account) to create a token for. |
Returns
- The created card token object is returned if successful. Otherwise, this call throws an error.
public
Token
retrieveToken
(String id)
Retrieve a Token
Retrieves the token with the given ID
Parameters
id
| The ID of the desired token |
Returns
- Returns a token if a valid ID was provided. Throws an error otherwise.