Get started with PayPal

This page offers a comprehensive guide to successfully integrating Paypal with DEUNA.

PayPal is a globally recognized digital payment platform providing a secure, convenient way for customers and merchants to make and receive electronic payments.

Requirements

The following content lists all the requirements for a successful integration with PayPal.

How it works

There are two types of payment processes in PayPal that you can choose depending on your needs:

PayPal Checkout

One-time payment checkout experience that gives you more control over the entire checkout process.

  • It offers a streamlined checkout flow that keeps customers local to your website during the payment authorization process.
  • Checkout does not provide the ability to store a customer's PayPal account.
  • Checkout only occurs for unauthenticated or new users and therefore, as they do not have an existing identity, they do not yet have the ability to select payment installments.

PayPal Vault

This flow allows you to charge the account in the future without requiring the customer to be present during the transaction or re-authenticate with PayPal when they are present during the transaction.

  • PayPal Vault is available to authenticated users only.
  • Vault has the ability to select payment installments.

Integration steps

Now that the technical requirements are set, you can start the step-by-step integration.

1. Set up the payment processor

  1. Add the PayPal Wallet to your DEUNA Admin Connections.
  2. Search for "PayPal Wallet" and then enter your PayPal business account credentials.
DEUNA Admin | PayPal Wallet Configuration

📘

The Vaulting checkbox allows authenticated users to save their account for quick future purchases without requiring authentication in PayPal.

2. Create order

To make a purchase, you must first create a DEUNA order.

Follow the steps to Create an Order.

The API will return an order_token that is used throughout the entire flow.

Required fields:

FieldDescriptionValue
order.store_codeUnique code of storeall
order.payment_methodDEUNA payment method type. (For API Integration)wallet
order.items_total_amountTotal amount of items without taxes nor discounts.2000

Considerations:

  • About order.items:
    • total_amount.original_amount must be unit_price.amount * quantity.
    • total_amount.amount must be ((unit_price.amount + tax_amount.amount) * quantity) - total_amount.total_discounts.
    • total_amount.total_discounts is the total value of discounts for the quantity of items.
  • order.items_total_amount is the sum of the items unit prices, this amount added to the order.total_tax_amount and minus order.discount_amount must match with the order.total_amount.
  • order.sub_total is the sum of the items unit price minus discounts, this amount added to the order.total_tax_amount must match the order.total_amount.

3. Choose the type of integration

After creating an order, choose the type of integration that best suits your needs:

4. Integrate FraudNet

Fraudnet is a library developed by PayPal that analyzes the data sent through the browser during the entire purchase process to prevent possible fraud in the transactions made.

Fraudnet must be running throughout the transaction process. For its integration, PayPal provides the following documentation: Integrate FraudNet

5. Validate payments

  • [Components to implement/Validate Payments]
  • [User flow diagrams if needed]
  • [Required fields for checkout form]
  • [Client-side validation requirements]