Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management

Add external payment methods

Add external payment methods to the Mobile Payment Element.

Note

We created a custom payment methods feature that allows you to extend your payment integration with payment methods processed outside of Stripe. We recommend using it for your integration instead of external payment methods.

The Mobile Payment Element can display external payment methods that you support in addition to the payment methods processed through Stripe. Integrating external payment methods requires additional integration work, because external payment method transactions are processed and finalized outside of Stripe.

External payment methods responsibility

When customers choose an external payment method, your app handles the payment instead of Stripe processing it. To learn about your responsibilities and the ongoing availability of external payment methods, see the external payment methods disclaimer.

This guide adds an external payment method, Fawry, using the Payment Sheet Accept In-app payments guide. See the list of all available external payment methods.

Before you begin

  1. Create a Stripe account or sign in.
  2. Follow the Payment Sheet example to complete a payments integration.
  3. For each external payment method you want to add, complete its integration and confirm that it’s working in the region where you want to enable it.

Add external payment method types

When you create your PaymentSheet.Configuration object and initialize PaymentSheet, specify the external payment methods that you want to add to the Payment Element and a handler to complete the payment. This example adds Fawry:

import StripePaymentSheet class MyCheckoutVC: UIViewController { func setUpPaymentSheet() { // ... var configuration = PaymentSheet.Configuration() configuration.externalPaymentMethodConfiguration = .init( externalPaymentMethods: ["external_fawry"] ) { externalPaymentMethodType, billingDetails, completion in self.handleExternalPaymentMethod(type: externalPaymentMethodType, billingDetails: billingDetails, completion: completion) } // ... } func handleExternalPaymentMethod(type: String, billingDetails: STPPaymentMethodBillingDetails, completion: @escaping (PaymentSheetResult) -> Void) { // ...explained in the next step } }

Complete the payment

When the customer taps the Buy button in PaymentSheet using an external payment method, it calls the handler with the type (for example, “external_fawry”), any billing details that were collected, and a completion handler.

Your implementation completes the payment (for example, by using your external payment method provider’s SDK) and calls the completion handler with the result of the payment: completed, canceled, or failure(error:).

If you pass .failure(error:), PaymentSheet displays the error using errorDescription for Swift errors and localizedDescription for NSErrors.

import StripePaymentSheet class MyCheckoutVC: UIViewController { func setUpPaymentSheet() { // ... var configuration = PaymentSheet.Configuration() configuration.externalPaymentMethods = .init( externalPaymentMethods: ["external_fawry"] ) { [weak self] externalPaymentMethodType, billingDetails, completion in self?.handleExternalPaymentMethod(type: externalPaymentMethodType, billingDetails: billingDetails, completion: completion) } // ... } func handleExternalPaymentMethod(type: String, billingDetails: STPPaymentMethodBillingDetails, completion: @escaping (PaymentSheetResult) -> Void) { // Your implementation should complete the payment with the payment method provider // When the payment completes, cancels, or fails, call the `completion` handler // Note you can present on top of PaymentSheet by using the `self.presentedViewController`. // This example code just immediately fails: let exampleError = NSError(domain: "MyErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "Failed to complete payment!"]) completion(.failed(error: exampleError)) } }

OptionalPosition external payment methods

Test your integration

  1. Go through your checkout flow and verify that the Payment Element displays Fawry. This example configures Fawry in the second position after cards.
    The Payment Element when Fawry is added
  2. Choose the Fawry payment method.
    The Payment Element when Fawry is selected
  3. Click Pay now to test your existing Fawry integration. Verify that your integration completes the transaction and that any post-payment actions (for example, displays a confirmation page, success message, or failure message) still work with your Fawry integration.

Dashboard considerations

PaymentIntents for transactions processed with an external payment method provider have an incomplete status in the Stripe Dashboard. Stripe isn’t involved in external payment method transactions and can’t determine the status of these transactions.

If you collect payment details before creating an Intent, you won’t see any incomplete transactions in the Stripe Dashboard for transactions that were processed with an external payment method provider.

External payment methods disclaimer

You can use the Stripe Mobile Payment Element to show some external payment methods that aren’t supported by Stripe but that you directly integrate with. When customers choose an external payment method, your app completes the transaction instead of the Stripe Mobile Payment Element. You acknowledge that:

  1. External payment methods aren’t offered nor supported by Stripe. The operation and support of external payment methods is provided by the external payment method provider.
  2. You’re responsible for maintaining a direct integration with the external payment method provider.
  3. You need to maintain an agreement with the external payment method provider and are responsible for complying with your agreements with each external payment method provider.
  4. You’re responsible for obtaining all necessary rights to use the external payment method provider’s marks and logos within your checkout as described in these docs.
  5. Stripe isn’t responsible for the processing of any transactions with any external payment method provider including, for example, any charges, refunds, disputes, settlements or funds flows.
  6. You or the external payment method provider are responsible for the completion of the purchase flow after a customer has selected an external payment method, including, for example, the order confirmation and reconciliation of orders.
  7. You’re responsible for properly configuring the redirect URL for the external payment method.
  8. You must immediately remove any external payment methods in the event your agreements with any external payment method provider terminate or Stripe removes the availability of an external payment method.
  9. You’re only permitted to integrate with and present in the Payment Element the external payment methods listed in this guide.
  10. You’re solely responsible for making sure that buyers are redirected correctly to their chosen external payment method.

Ongoing availability of external payment methods

Stripe might at any time decide to remove the availability of any payment method as an external payment method. Stripe will notify you of any removal of an external payment method that you’re using, and you must immediately remove the external payment method in your code. Failure to do so will result in the external payment method not rendering to your customers.

Available external payment methods

You can display the following external payment methods. You must use the corresponding external payment method type in your code.

RegionPayment methodExternal payment method type
AMERInteracexternal_interac
APACau PAYexternal_au_pay
APACatoneexternal_atone
APACTouch’n Goexternal_tng_ewallet
APACソフトバンクまとめて支払い (Softbank carrier payments)external_softbank_carrier_payment
APACToss Payexternal_toss_pay
APACLaybuyexternal_laybuy
APACBank Payexternal_bank_pay
APACauかんたん決済 (au easy payments)external_au_easy_payment
APACBitCashexternal_bitcash
APACAzupayexternal_azupay
APACd払い (d-barai)external_dbarai
APACFamiPayexternal_famipay
APACGCashexternal_gcash
APACGrabPay Laterexternal_grabpay_later
APACMoMoexternal_momo
APACNET CASHexternal_net_cash
APACOctopusexternal_octopus
APACPaidyexternal_paidy
APACPayPayexternal_paypay
APACPlanPayexternal_planpay
APACペイジー (Pay-easy)external_pay_easy
APAC楽天ペイ (Rakuten Pay)external_rakuten_pay
APACメルペイ (Merpay)external_merpay
APACWebMoneyexternal_webmoney
APAC, EuropeShopback Payexternal_shopback_pay
EuropeAplazameexternal_aplazame
EuropeBizumexternal_bizum
EuropeDividoexternal_divido
EuropeFonixexternal_fonix
EuropeIwocapayexternal_iwocapay
EuropeKBCexternal_kbc
EuropeNexi Payexternal_nexi_pay
EuropeOneyexternal_oney
EuropePayconiqexternal_payconiq
EuropePayPoexternal_paypo
EuropeSofincoexternal_sofinco
EuropePostepayexternal_postepay
EuropePostFinanceexternal_postfinance
EuropeScalapayexternal_scalapay
EuropeTrueLayerexternal_truelayer
EuropeWalleyexternal_walley
EuropeYounitedPayexternal_younited_pay
GlobalLINE Payexternal_line_pay
Globalpaysafecardexternal_paysafecard
GlobalSamsung Payexternal_samsung_pay
GlobalSezzleexternal_sezzle
LATAMDappexternal_dapp
LATAMPicPayexternal_picpay
MEATabbyexternal_tabby
MEABenefitexternal_benefit
MEAFawryexternal_fawry
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc