public class SourceParams
extends java.lang.Object
Source object on the server.| Modifier and Type | Method and Description |
|---|---|
static SourceParams |
createAlipayReusableParams(java.lang.String currency,
java.lang.String name,
java.lang.String email,
java.lang.String returnUrl)
Create parameters necessary for creating a reusable Alipay source.
|
static SourceParams |
createAlipaySingleUseParams(long amount,
java.lang.String currency,
java.lang.String name,
java.lang.String email,
java.lang.String returnUrl)
Create parameters necessary for creating a single use Alipay source.
|
static SourceParams |
createBancontactParams(long amount,
java.lang.String name,
java.lang.String returnUrl,
java.lang.String statementDescriptor,
java.lang.String preferredLanguage)
Create parameters necessary for creating a Bancontact source.
|
static SourceParams |
createCardParams(Card card)
Create parameters necessary for creating a card source.
|
static SourceParams |
createCustomParams()
Create a custom
SourceParams object. |
static SourceParams |
createEPSParams(long amount,
java.lang.String name,
java.lang.String returnUrl,
java.lang.String statementDescriptor)
Create parameters necessary for creating an EPS source.
|
static SourceParams |
createGiropayParams(long amount,
java.lang.String name,
java.lang.String returnUrl,
java.lang.String statementDescriptor)
Create parameters necessary for creating a Giropay source
|
static SourceParams |
createIdealParams(long amount,
java.lang.String name,
java.lang.String returnUrl,
java.lang.String statementDescriptor,
java.lang.String bank)
Create parameters necessary for creating an iDEAL source.
|
static SourceParams |
createMasterpassParams(java.lang.String transactionId,
java.lang.String cartID)
Create parameters needed to make a Masterpass source
|
static SourceParams |
createMultibancoParams(long amount,
java.lang.String returnUrl,
java.lang.String email)
Create parameters necessary to create a Multibanco source.
|
static SourceParams |
createP24Params(long amount,
java.lang.String currency,
java.lang.String name,
java.lang.String email,
java.lang.String returnUrl)
Create parameters necessary for creating a P24 source.
|
static java.util.Map<java.lang.String,java.lang.Object> |
createRetrieveSourceParams(java.lang.String clientSecret)
Create parameters needed to retrieve a source.
|
static SourceParams |
createSepaDebitParams(java.lang.String name,
java.lang.String iban,
java.lang.String addressLine1,
java.lang.String city,
java.lang.String postalCode,
java.lang.String country) |
static SourceParams |
createSepaDebitParams(java.lang.String name,
java.lang.String iban,
java.lang.String email,
java.lang.String addressLine1,
java.lang.String city,
java.lang.String postalCode,
java.lang.String country)
Create parameters necessary to create a SEPA debit source
|
static SourceParams |
createSofortParams(long amount,
java.lang.String returnUrl,
java.lang.String country,
java.lang.String statementDescriptor)
Create parameters necessary to create a SOFORT source.
|
static SourceParams |
createSourceFromTokenParams(java.lang.String tokenId)
Create parameters necessary for converting a token into a source
|
static SourceParams |
createThreeDSecureParams(long amount,
java.lang.String currency,
java.lang.String returnUrl,
java.lang.String cardID)
Create parameters necessary to create a 3D Secure source.
|
static SourceParams |
createVisaCheckoutParams(java.lang.String callId)
Create parameters needed to make a Visa Checkout source.
|
java.lang.Long |
getAmount() |
java.util.Map<java.lang.String,java.lang.Object> |
getApiParameterMap() |
java.lang.String |
getCurrency() |
java.util.Map<java.lang.String,java.lang.String> |
getMetaData() |
java.util.Map<java.lang.String,java.lang.Object> |
getOwner() |
java.util.Map<java.lang.String,java.lang.Object> |
getRedirect() |
java.lang.String |
getType() |
java.lang.String |
getTypeRaw() |
java.lang.String |
getUsage() |
SourceParams |
setAmount(long amount) |
SourceParams |
setApiParameterMap(java.util.Map<java.lang.String,java.lang.Object> apiParameterMap) |
SourceParams |
setCurrency(java.lang.String currency) |
SourceParams |
setExtraParams(java.util.Map<java.lang.String,java.lang.Object> extraParams)
Sets extra params for this source object.
|
SourceParams |
setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData)
Set custom metadata on the parameters.
|
SourceParams |
setOwner(java.util.Map<java.lang.String,java.lang.Object> owner) |
SourceParams |
setRedirect(java.util.Map<java.lang.String,java.lang.Object> redirect)
Sets a redirect property map for this source object.
|
SourceParams |
setReturnUrl(java.lang.String returnUrl) |
SourceParams |
setToken(java.lang.String token)
Sets a token ID on the parameters.
|
SourceParams |
setType(java.lang.String type)
Sets the
Source.SourceType for this source. |
SourceParams |
setTypeRaw(java.lang.String typeRaw)
Sets a custom type for the source, and sets the
type for these parameters
to be Source.UNKNOWN. |
SourceParams |
setUsage(java.lang.String usage)
Sets a usage value on the parameters.
|
java.util.Map<java.lang.String,java.lang.Object> |
toParamMap()
Create a string-keyed map representing this object that is
ready to be sent over the network.
|
public static SourceParams createP24Params(long amount, java.lang.String currency, java.lang.String name, java.lang.String email, java.lang.String returnUrl)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).currency - `eur` or `pln` (P24 payments must be in either Euros or Polish Zloty).name - The name of the account holder (optional).email - The email address of the account holder.returnUrl - The URL the customer should be redirected to after the authorization
process.SourceParams that can be used to create a P24 sourcepublic static SourceParams createAlipayReusableParams(java.lang.String currency, java.lang.String name, java.lang.String email, java.lang.String returnUrl)
currency - The currency of the payment. Must be the default currency for your country.
Can be aud, cad, eur, gbp, hkd, jpy, nzd, sgd, or usd. Users in Denmark,
Norway, Sweden, or Switzerland must use eur.name - The name of the account holder (optional).email - The email address of the account holder (optional).returnUrl - The URL the customer should be redirected to after the authorization
process.SourceParams that can be used to create an Alipay reusable sourcepublic static SourceParams createAlipaySingleUseParams(long amount, java.lang.String currency, java.lang.String name, java.lang.String email, java.lang.String returnUrl)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a $10.99 payment).currency - The currency of the payment. Must be the default currency for your country.
Can be aud, cad, eur, gbp, hkd, jpy, nzd, sgd, or usd. Users in Denmark,
Norway, Sweden, or Switzerland must use eur.name - The name of the account holder (optional).email - The email address of the account holder (optional).returnUrl - The URL the customer should be redirected to after the authorization
process.SourceParams that can be used to create an Alipay single-use sourcepublic static SourceParams createBancontactParams(long amount, java.lang.String name, java.lang.String returnUrl, java.lang.String statementDescriptor, java.lang.String preferredLanguage)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment). The charge amount must be
at least €1 or its equivalent in the given currency.name - The full name of the account holder.returnUrl - The URL the customer should be redirected to after the authorization
process.statementDescriptor - A custom statement descriptor for the payment (optional).preferredLanguage - The preferred language of the Bancontact authorization page that the
customer is redirected to. Supported values are: en, de, fr, or nl
(optional).SourceParams object that can be used to create a Bancontact sourcepublic static SourceParams createCustomParams()
SourceParams object. Incorrect attributes may result in errors
when connecting to Stripe's API.SourceParams object.public static SourceParams createSourceFromTokenParams(java.lang.String tokenId)
tokenId - the id of the Token to be converted into a source.SourceParams object that can be used to create a source.public static SourceParams createCardParams(Card card)
card - A Card object containing the details necessary for the source.SourceParams object that can be used to create a card source.public static SourceParams createEPSParams(long amount, java.lang.String name, java.lang.String returnUrl, java.lang.String statementDescriptor)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).name - The full name of the account holder.returnUrl - The URL the customer should be redirected to after the authorization
process.statementDescriptor - A custom statement descriptor for the payment (optional).SourceParams object that can be used to create an EPS sourcepublic static SourceParams createGiropayParams(long amount, java.lang.String name, java.lang.String returnUrl, java.lang.String statementDescriptor)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).name - The full name of the account holder.returnUrl - The URL the customer should be redirected to after the authorization
process.statementDescriptor - A custom statement descriptor for the payment (optional).SourceParams object that can be used to create a Giropay sourcepublic static SourceParams createIdealParams(long amount, java.lang.String name, java.lang.String returnUrl, java.lang.String statementDescriptor, java.lang.String bank)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).name - The full name of the account holder (optional).returnUrl - The URL the customer should be redirected to after the authorization
process.statementDescriptor - A custom statement descriptor for the payment (optional).bank - The customer’s bank (optional).SourceParams object that can be used to create an iDEAL sourcepublic static SourceParams createMultibancoParams(long amount, java.lang.String returnUrl, java.lang.String email)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).returnUrl - The URL the customer should be redirected to after the authorization
process.email - The full email address of the customer.SourceParams object that can be used to create a Multibanco sourcepublic static SourceParams createSepaDebitParams(java.lang.String name, java.lang.String iban, java.lang.String addressLine1, java.lang.String city, java.lang.String postalCode, java.lang.String country)
public static SourceParams createSepaDebitParams(java.lang.String name, java.lang.String iban, java.lang.String email, java.lang.String addressLine1, java.lang.String city, java.lang.String postalCode, java.lang.String country)
name - The full name of the account holder.iban - The IBAN number for the bank account that you wish to debit.email - The full email address of the owner (optional).addressLine1 - The first line of the owner's address (optional).city - The city of the owner's address.postalCode - The postal code of the owner's address.country - The ISO-3166 2-letter country code of the owner's address.SourceParams object that can be used to create a SEPA debit sourcepublic static SourceParams createSofortParams(long amount, java.lang.String returnUrl, java.lang.String country, java.lang.String statementDescriptor)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).returnUrl - The URL the customer should be redirected to after the authorization
process.country - The ISO-3166 2-letter country code of the customer’s bank.statementDescriptor - A custom statement descriptor for the payment (optional).SourceParams object that can be used to create a SOFORT sourcepublic static SourceParams createThreeDSecureParams(long amount, java.lang.String currency, java.lang.String returnUrl, java.lang.String cardID)
amount - A positive integer in the smallest currency unit representing the amount to
charge the customer (e.g., 1099 for a €10.99 payment).currency - The currency the payment is being created in (e.g., eur).returnUrl - The URL the customer should be redirected to after the verification process.cardID - The ID of the card source.SourceParams object that can be used to create a 3D Secure sourcepublic static SourceParams createVisaCheckoutParams(java.lang.String callId)
callId - The payment request ID (callId) from the Visa Checkout SDK.SourceParams object that can be used to create a Visa Checkout Card Source.public static SourceParams createMasterpassParams(java.lang.String transactionId, java.lang.String cartID)
transactionId - The transaction ID from the Masterpass SDK.cartID - A unique string that you generate to identify the purchase when creating a cart
for checkout in the Masterpass SDK.SourceParams object that can be used to create a Masterpass Card Source.public static java.util.Map<java.lang.String,java.lang.Object> createRetrieveSourceParams(java.lang.String clientSecret)
clientSecret - the client secret for the source, needed because the Android SDK uses
a public keyMap matching the parameter name to the client secret, ready to send to
the server.public java.lang.Long getAmount()
public java.util.Map<java.lang.String,java.lang.Object> getApiParameterMap()
Map of the parameters specific to this type of sourcepublic java.lang.String getCurrency()
public java.util.Map<java.lang.String,java.lang.Object> getOwner()
public java.util.Map<java.lang.String,java.lang.Object> getRedirect()
public java.lang.String getType()
Type of this sourcepublic java.lang.String getTypeRaw()
public java.lang.String getUsage()
public java.util.Map<java.lang.String,java.lang.String> getMetaData()
public SourceParams setAmount(long amount)
amount - currency amount for this source, in the lowest denomination.this, for chaining purposespublic SourceParams setApiParameterMap(java.util.Map<java.lang.String,java.lang.Object> apiParameterMap)
apiParameterMap - a map of parameters specific for this type of sourcethis, for chaining purposespublic SourceParams setCurrency(java.lang.String currency)
currency - currency code for this source (i.e. "EUR")this, for chaining purposespublic SourceParams setOwner(java.util.Map<java.lang.String,java.lang.Object> owner)
owner - an SourceOwner object for this sourcethis, for chaining purposespublic SourceParams setRedirect(java.util.Map<java.lang.String,java.lang.Object> redirect)
setReturnUrl(String).redirect - a set of redirect parametersthis, for chaining purposespublic SourceParams setExtraParams(java.util.Map<java.lang.String,java.lang.Object> extraParams)
extraParams - a set of paramsthis, for chaining purposespublic SourceParams setReturnUrl(java.lang.String returnUrl)
returnUrl - a redirect URL for this source.this, for chaining purposespublic SourceParams setType(java.lang.String type)
Source.SourceType for this source. If you are creating a custom type,
use setTypeRaw(String).type - the Source.SourceTypethis, for chaining purposespublic SourceParams setTypeRaw(java.lang.String typeRaw)
type for these parameters
to be Source.UNKNOWN.typeRaw - the name of the source typethis, for chaining purposespublic SourceParams setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData)
metaData - this, for chaining purposespublic SourceParams setToken(java.lang.String token)
token - a token IDthis, for chaining purposespublic SourceParams setUsage(java.lang.String usage)
usage - either "single_use" or "reusable"this for chaining purposespublic java.util.Map<java.lang.String,java.lang.Object> toParamMap()