Stripe Transactions
This information is relevant only for applications that process transactions using Stripe as the clearing institute.
After completing integration you can enable your merchants to process Stripe transactions with the PayButton.
  1. Attach a Stripe processing path to your merchants.
  2. Use the 
    merchantIdentifier
    and 
    merchantSecretKey
    in your implementation. You can then start a payment and send additional parameters, such as a statement descriptor or metadata, to Stripe.
MPTransactionParameters *parameters = [MPTransactionParameters chargeWithAmount:[NSDecimalNumber decimalNumberWithString:@"10.00"] currency:MPCurrencyGBP optionals:^(id optionals) { // This subject will appear as the Description in the Stripe Dashboard optionals.subject = @"Bouquet of Flowers"; // Specify a Statement Descriptor optionals.statementDescriptor = @"Bouquet"; // Specify up to 17 key-value pairs (See https://stripe.com/docs/api#metadata) optionals.metadata = @{ @"Source" : @"POS", @"Clerk Name" : @"John Appleseed" }; }];
All transactions will immediately appear in your Stripe Dashboard.
Make sure to use a test card when testing your integration because live cards are not permitted on the test system. Transactions below GBP 0.30 or EUR 0.50 will be declined by Stripe.
Accessing the Stripe Charge ID
If you need the Stripe Charge ID for a transaction, you can get it by using the
MPTransaction
in the 
completed
block:
NSString *stripeChargeId = [[transaction clearingDetails] transactionIdentifier];
You can also query the transaction from your backend and you will find transaction detail in the
clearingDetails.transactionIdentifier
property.
Collecting an Application Fee with Stripe Connect
When using Stripe Connect your platform can easily collect an application fee from your merchants. For information about using Stripe Connect with your integration, read this page.
Provide the
applicationFee
parameter in addition to the other parameters:
MPTransactionParameters *parameters = [MPTransactionParameters chargeWithAmount:[NSDecimalNumber decimalNumberWithString:@"10.00"] currency:MPCurrencyGBP optionals:^(id optionals) { // This subject will appear as the Description in the Stripe Dashboard optionals.subject = @"Bouquet of Flowers"; // Specify a Statement Descriptor optionals.statementDescriptor = @"Bouquet";
// Specify the Application Fee you want to receive (e.g. 1.23 equals 123 pence) optionals.applicationFee = [NSDecimalNumber decimalNumberWithString:@"1.23"];
// Specify up to 17 key-value pairs (See https://stripe.com/docs/api#metadata) optionals.metadata = @{ @"Source" : @"POS", @"Clerk Name" : @"John Appleseed" }; }];
Stripe Transactions
IMPORTANT
The PayButton Integration (Android) is in maintenance mode. For Android integrations, please use the new Default UI Integration SDK.
This information is relevant only for applications that process transactions using Stripe as the clearing institute.
After completing integration you can enable your merchants to process Stripe transactions with the PayButton.
  1. Attach a Stripe processing path to your merchants.
  2. Use the 
    merchantIdentifier
    and 
    merchantSecretKey
    in your implementation. You can then start a payment and send additional parameters, such as a statement descriptor or metadata, to Stripe.
// Specify up to 20 key-value pairs (See https://stripe.com/docs/api#metadata) Map metadata = new HashMap(); metadata.put("Source","POS"); metadata.put("Clerk Name", "John Appleseed"); TransactionParameters parameters = new TransactionParameters.Builder() .charge(new BigDecimal("10.00"), Currency.GBP) // This subject will appear as the Description in the Stripe Dashboard .subject("Bouquet of Flowers") // Specify a Statement Descriptor .statementDescriptor("Bouquet") .metadata(metadata) .build();
All transactions will immediately appear in your Stripe Dashboard.
Make sure to use a test card when testing your integration because live cards are not permitted on the test system. Transactions below GBP 0.30 will be declined by Stripe. 
Accessing the Stripe Charge ID
Use 
Transaction
in the 
onActivityResult
method:
Transaction transaction = MposUi.getInitializedInstance().getTransaction(); String stripeChargeId = transaction.getClearingDetails().getTransactionIdentifier();
You can also query the transaction from your backend and you will find it in the
clearingDetails.transactionIdentifier
property.
Collecting an Application Fee with Stripe Connect
When using Stripe Connect your platform can easily collect an application fee from your merchants. For instructions on how to use Stripe Connect together with your integration, read  this page.
Provide the
applicationFee
parameter in addition to the other parameters:
// Specify up to 17 key-value pairs (See https://stripe.com/docs/api#metadata) Map metadata = new HashMap(); metadata.put("Source","POS"); metadata.put("Clerk Name", "John Appleseed"); TransactionParameters parameters = new TransactionParameters.Builder() .charge(new BigDecimal("10.00"), Currency.GBP) // This subject will appear as the Description in the Stripe Dashboard .subject("Bouquet of Flowers") // Specify a Statement Descriptor .statementDescriptor("Bouquet")
// Specify the Application Fee you want to receive (e.g. 1.23 equals 123 pence) .applicationFee(new BigDecimal("1.23"))
.metadata(metadata) .build();