v1

latestOpenAPI 3.1.02026-07-245178279.0 KB
Payment Links

Create payment Link

Este endpoint permite crear un enlace de pago para asociarla a una o varias órdenes.

post/merchants/payments-links

Headers

X-API-KEYstring required

<a href="https://docs.deuna.com/reference/checkout-deuna#autenticaci%C3%B3n" target="_blank">Llave privada</a> del comercio

x-merchant-idstring

Only needed if the Auth type is bearer token

Example:1b753a67-ed2c-4cdb-9f8e-431e75960a4f

referencia del merchant

Request body

Example request

{
  "checkout_modules": [
    {
      "name": "Payment Gateway"
    }
  ],
  "configuration": {
    "expires_at": "2022-07-25T14:30:00.000Z",
    "max_completed_purchases": 10,
    "max_payment_retries": 3,
    "payment_link_name": "Pay Now"
  },
  "order": {
    "currency": "USD",
    "is_paid": true,
    "items": [
      {
        "description": "This is a product description",
        "id": "ITEM-12345",
        "image_url": "https://example.com/image.jpg",
        "name": "Product A",
        "quantity": 2,
        "tax_amount": {
          "currency": "USD",
          "currency_symbol": "$"
        },
        "total_amount": {
          "amount": 50,
          "currency": "USD",
          "currency_symbol": "$",
          "discount_amount": 10,
          "original_amount": 60
        },
        "unit_price": {
          "amount": 20,
          "currency": "USD",
          "currency_symbol": "$"
        }
      }
    ],
    "items_total_amount": 100.99,
    "order_id": "ORD-12345",
    "store_code": "STORE-001",
    "sub_total": 90,
    "total_amount": 100,
    "total_tax_amount": 10
  }
}

Response

Payment link creada

payment_linkstring

URL of the payment link

payment_link_idstring

ID of the payment link

Example response

{
  "configuration": {
    "expires_at": "2025-11-07 03:40:11.054707389 +0000 UTC",
    "max_completed_purchases": 1,
    "max_payment_retries": 2,
    "payment_link_name": "creacion payment link + impuestos"
  },
  "order": {
    "currency": "MXN",
    "items": [
      {
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet.",
        "id": "789012345",
        "image_url": "https://cdn.stg.deuna.io/explore-deuna/assets/ticketevent.png",
        "name": "Event Ticket",
        "quantity": 1,
        "tax_amount": {
          "currency": "PEN",
          "currency_symbol": "S/"
        },
        "total_amount": {
          "amount": 7220,
          "currency": "PEN",
          "currency_symbol": "S/"
        },
        "unit_price": {
          "amount": 7220,
          "currency": "PEN",
          "currency_symbol": "S/"
        }
      }
    ],
    "items_total_amount": 7000,
    "redirect_urls": {
      "success": "https://example.com/success"
    },
    "store_code": "all",
    "sub_total": 7000,
    "total_amount": 7220,
    "total_tax_amount": 220
  },
  "payment_link": "https://api.stg.deuna.io/payment-link/a1063733-fdec-446d-8d1f-a1799deab951",
  "payment_link_id": "a1063733-fdec-446d-8d1f-a1799deab951"
}