This page explains how to add PayPo to your existing Android Components integration.
Choose the server-side flow that your integration uses:
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built a Sessions flow Android Components integration. The minimum required version is 5.0.0. |
Setup steps | Before you begin, add PayPo in your Customer Area. |
Create a payment session
This step corresponds to Create a payment session in the Components integration guide.
You do not need to include any additional parameters for PayPo in the API request.
Set up Components
This section corresponds to Set up Components in the Components integration guide.
Import the library
This step corresponds to the Import the library step of the Components integration guide.
During this step of integrating, use the following code snippets:
With Jetpack Compose
implementation "com.adyen.checkout:instant:YOUR_VERSION" implementation "com.adyen.checkout:components-compose:YOUR_VERSION"
Without Jetpack Compose
implementation "com.adyen.checkout:instant:YOUR_VERSION"
Configure the Component
This step corresponds to Configure components of the Components integration guide.
No specific configuration is required for PayPo.
Create the checkout session
This step corresponds to the create a payment session step in the main integration guide.
Launch and show the Component
This corresponds to the Launch and show the Component step in the main integration guide.
During this step of integrating, use the following code snippets:
With Jetpack Compose
Component import com.adyen.checkout.components.compose.get // Get the payment method. val paymentMethod = checkoutSession.getPaymentMethod(PaymentMethodTypes.PAYPO) @Composable private fun ComposableInstantComponent() { // Keep a reference to this Component in case you need to access it later. val instantPaymentComponent = InstantPaymentComponent.PROVIDER.get( checkoutSession = checkoutSession, paymentMethod = paymentMethod, configuration = configuration, componentCallback = callback, // This key is required to ensure a new Component gets created for each different screen or payment session. // Generate a new value for this key every time you need to reset the Component. key = "YOUR_UNIQUE_KEY_FOR_THIS_COMPONENT", ) // This is your composable, a wrapper around our xml view. AdyenComponent( component = instantPaymentComponent, modifier = YOUR_MODIFIER, )
Without Jetpack Compose
<com.adyen.checkout.ui.core.AdyenComponentView android:id="@+id/YOUR_COMPONENT_VIEW_ID" .../> // Get the payment method. val paymentMethod = checkoutSession.getPaymentMethod(PaymentMethodTypes.PAYPO) val instantPaymentComponent = InstantPaymentComponent.PROVIDER.get( activity, // Your activity or fragment. checkoutSession, paymentMethod, cardConfiguration, componentCallback, ) binding.componentView.attach(instantPaymentComponent, viewLifecycleOwner)
Capture the payment
When a payment is made, but not yet authorized, the offer will be available for up to 72 hours. Therefore, the shopper can use the link to the payment for up to 72 hours.
When the payment is accepted by the shopper, its status will change to Authorised. The shopper has 30 days to pay according to the terms of PayPo. This is different to some other payment methods where the payment term usually starts after the capture, not after the authorization.
After the payment is authorized, you also have to capture the payment.
- It is only possible to capture the full amount of the authorized payment.
- It is possible to configure an automatic capture, which executes immediately after authorization. Configure automatic capture when adding PayPo in your live Customer Area.
- The merchant does not have to wait for the shopper to complete their payment to PayPo to be funded for the transaction. After the payment is captured, the merchant is funded the full amount of the payment. This is because the capture is only possible for the full amount.
-
To perform the capture, send a request to /payments/{paymentPspReference}/captures using the PSP Reference of the original payment:
Example /captures requestExpand viewCopy link to code blockCopy codecurl https://checkout-test.adyen.com/v71/payments/CLB738LDH8PQ7RT5/captures \ -H "x-API-key: ADYEN_API_KEY" \ -H "content-type: application/json" \ -d '{ "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "amount": { "value": 1000, "currency": "PLN" }, "reference": "YOUR_UNIQUE_REFERENCE" }'
Test and go live
When you test PayPo in your test environment, use the following values for the required parameters:
firstName
: name
lastName
: surname
shopperEmail
: email@gmail.com
When you are redirected to PayPo and asked for a verification code, use 123456.
Check the status of PayPo test payments in your Customer Area > Transactions > Payments.
Before you can accept live PayPo payments, you need to submit a request for PayPo in your live Customer Area.