SDK integration
This guide provides a step-by-step process to integrate the Yuno SDK with Apple Pay. Following this guide will enable seamless payment processing through Apple Pay.
Step 1: Add the Connection
To add the Apple Pay connection to the Yuno dashboard, follow these steps:
- Log in to your Yuno dashboard.
- Navigate to the Connections section.
- Locate and select the Apple Pay option and click Connect.
- Provide a Name for the connection, select Apple Pay as Payment method, and provide the information you acquired when following the Prerequisites process.
- Click Add. Apple Pay will be added to your connections.
Step 2: Add a Route for Apple Pay
Set up a new route to control how payments are processed through Apple Pay. Follow the steps below:
- In the Yuno dashboard, navigate to the Routing section.
- The Apple Pay new connection is on the Not published tab.
- Set up a new route by pressing Setup on your Apple Pay module and then pressing Create new route.
- Add conditions to specify when payments should be routed through Apple Pay.
- Add Apple Pay as the payment processor for this route to ensure that payments meeting the defined conditions are processed through Apple Pay.
- Save and publish the route once all configurations are properly defined.
The following image displays a simple route through which Apple Pay processes all payments.
- Once that is done, you will need to set the route for the Card payment method indicating with which provider you want to process payments with.
Step 3: Checkout Builder
To make Apple Pay available to your end users, follow these steps:
- In the Yuno dashboard, navigate to the Checkout Builder section.
- Locate the available Payment methods and enable Apple Pay.
- Press Publish to make Apple Pay available as a payment option for all transactions that meet the defined routing criteria.
Step 4: Start Using Your Yuno Integration
With your Yuno integration set up, you're ready to start processing payments. Using our standard Full or Lite SDK integration, you can seamlessly offer payments through Apple Pay Wallet, providing your users with a smooth and secure payment experience.
Using Yuno's SDK
-
Create a Customer: Use the Create Customer endpoint to register the customer's information. (Optional)
-
Set Up a Checkout Session: You can create a checkout session with a registered customer. Use the Create Checkout Session endpoint, providing the payment amount and location details.
-
Generate a One-Time Token (OTT): An OTT is a unique identifier Yuno generates to protect your customer's privacy and security. You will obtain the OTT from the Yuno SDK, which handles various payment method scenarios, supports fraud screening, and 3DS authentication. Use
payment_method_type = APPLE_PAY
. Access Payment type to view available payment types. -
Create the Payment: Use the Create Payment endpoint to create a payment. To create the payment, you will inform the data received in the previous three steps.
-
Retrieve Payment Details: To check the payment status, you can analyze the
status
andsub_status
in the response from the Create Payment endpoint or use the Webhooks. Refer to the Payment Status page to see all possible statuses.
Step 5: Prepare for Testing with Apple Pay
Before you start making test payments with Apple Pay, follow these steps to ensure your setup is correctly configured:
- Follow the official Apple Pay test guidelines to create a test account and set up test cards.
- Test in Safari to ensure compatibility and functionality.
- Set up the testing domain URL in the Apple Pay connection within your Yuno dashboard to ensure that payments are routed correctly during testing.
Updated about 1 month ago