This page is only relevant for applications that process transactions with Stripe as clearing institute!
After integration, make sure to attach a Stripe processing path to your merchants and use the merchantIdentifier
and merchantSecretKey
in your implementation.
You can then start a payment and also send additional parameters towards Stripe like a statement descriptor or metadata.
MPTransactionParameters *parameters = [MPTransactionParameters chargeWithAmount:[NSDecimalNumber decimalNumberWithString:@"10.00"] currency:MPCurrencyGBP optionals:^(idoptionals) { // 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, since real cards are not permitted on the test system. Transactions below GBP 0.30 will be declined by Stripe.
Accessing the Stripe Charge ID
If you need the Stripe Charge ID for a transaction, you can get it
via MPTransaction
in the completed
block:
NSString *stripeChargeId = [[transaction clearingDetails] transactionIdentifier];
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, please read this page.
Provide the applicationFee
parameter in addition to the other parameters:
MPTransactionParameters *parameters = [MPTransactionParameters chargeWithAmount:[NSDecimalNumber decimalNumberWithString:@"10.00"] currency:MPCurrencyGBP optionals:^(idoptionals) { // 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" }; }];
This page is only relevant for applications that process transactions with Stripe as clearing institute!
After integration, make sure to attach a Stripe processing path to your merchants and use the merchantIdentifier
and merchantSecretKey
in your implementation.
You can then start a payment and also send additional parameters towards Stripe like a statement descriptor or metadata.
// Specify up to 17 key-value pairs (See https://stripe.com/docs/api#metadata) Mapmetadata = 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, since real 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, please 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) Mapmetadata = 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();