Direct API
Build a merchant-owned payment experience with DEUNA server APIs.
On this page
Own the interface and coordinate payments from your backend.
Build the customer journey in your application and use DEUNA APIs for payment, user, card, and orchestration operations.
- Interface
- Merchant-owned frontend and backend
- Delivery model
- Server-to-server APIs with client-side support where required
- Best for
- Teams that require maximum product control
Integrate DEUNA Payment and Checkout solutions into your application via Direct API/Headless.
DEUNA API services are organized around the REST principle.
This means that the services:
- Are resource-oriented.
- Receive and return JSON responses.
- Use standard HTTP response codes.
- Authenticate with REST standards
- Use the standard REST verbs GET, POST, PATCH, FETCH, and DELETE.
Authentication#
DEUNA creates private and public API Keys for your application.
Use API Keys to authenticate as a merchant to the API. APY Keys are created during the creation of your Sandbox account and can also be provided by a DEUNA TPM. You can create multiple API Keys associated with the same account.
JWT tokens are used for calls that create payments, store cards, and operate with user data.
Idempotence#
DEUNA APIs support idempotence, allowing you to retry requests to our API without concern for accidentally generating the same operation twice.
DEUNA saves the response code and the payload of the first request for each value of the idempotency key.
DEUNA saves the response code and the payload of the first request for each value of the idempotency key.
Idempotency keys are used for the HTTP verb: POST.
Environments#
The DEUNA API environment has two environments that are independent of each other:
Sandbox
Sandbox is the environment used for testing.
The sandbox environment contains the connections to the various payment and fraud providers targeting their respective test environments.
Use the sandbox environment to carry out the tests with data available to each supplier
URL: https://api.sandbox.deuna.io
Production
Production is the environment used to process actual transactions in the production environment.
It is highly recommended to test each integration in the sandbox environment before moving it to production.
URL: https://api.deuna.io
Postman collection#
DEUNA has the following public Postman collection for more convenient integrations and testing: DEUNA Postman collection.
User management#
DEUNA allows the creation of users for better management and structure of all resources and services:
- Create users.
- Get users.
- Delete users.
- Associate stored cards with users.
- Associate payments to users.
- Associate addresses to users.
Store cards#
DEUNA offers card storage functionality to store previously stored cards and provide a better experience for your customers.
DEUNA generates a unique token for each card created that can be stored without any risk.
Process payments#
Process payments from your users through a single integration using our payment and fraud engine that allows to orchestrate payments in real time.
Process payments with multiple payment and fraud providers while maintaining the same response structure and standardization of error codes between suppliers.
3DS#
DEUNA supports the 3DS flow in all its integrations.
Webhooks#
DEUNA communicates updates about order status changes via webhook.
Webhooks are recommended for communicating asynchronous events from payment methods. The approval or rejection result is communicated using this standard.
With new technologies like 3DS, even card transactions become asynchronous, and it's important to listen for order events once the user completes authentication with their bank and receives a final payment status.