PayPal

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.
- Environments:
- Sandbox: https://api.sandbox.deuna.io
- Production: https://api.deuna.io
- Postman Collection:
https://www.postman.com/deunaonline/workspace/deuna/folder/30572503-42f68d9b-0763-4002-ba5f-7d1168462e59?action=share&source=copy-link&creator=36841419&ctx=documentation
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
- Add the PayPal Wallet to your DEUNA Admin Connections.
- Search for "PayPal Wallet" and then enter your PayPal business account credentials.

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:
Field | Description | Value |
---|---|---|
order.store_code | Unique code of store | all |
order.payment_method | DEUNA payment method type. (For API Integration) | wallet |
order.items_total_amount | Total amount of items without taxes nor discounts. | 2000 |
Considerations:
- About
order.items
:total_amount.original_amount
must beunit_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 theorder.total_tax_amount
and minusorder.discount_amount
must match with theorder.total_amount
.order.sub_total
is the sum of the items unit price minus discounts, this amount added to theorder.total_tax_amount
must match theorder.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]
Updated about 5 hours ago