Skip to main content
POST
/
api
/
v1
/
pay
Create new payment
curl --request POST \
  --url http://localhost:8888/api/v1/pay \
  --header 'Content-Type: application/json' \
  --data '
{
  "accept": {
    "args": {
      "payment_request_hash": "efa31e68e0cc1fc8d5447b6c5ea101c751381692f0b97e64fd5187f60b68d647"
    },
    "encrypted": "clear",
    "function": "fastpay",
    "id": "0191a7d4-d876-7927-8629-c8f1f9df8c55",
    "key": "GKKPAB7n9GXj8fJr8mB7k9Maw6mesaQ9UyqE7Hk74tTC",
    "law": "normal",
    "signature": "2CbUf2P9bWhEfcSXw19ozKKhKEwuFqqn8UtCPQQ1zQ7yJG4hu9LEosPhNQAaVQQ4VQYiRB36kjEA4hMUtA8xhYSs",
    "signer": "[email protected]",
    "target": "pay.dev.veratix.io",
    "ttl": 5000,
    "version": "1.0"
  },
  "offer": {
    "hash": "efa31e68e0cc1fc8d5447b6c5ea101c751381692f0b97e64fd5187f60b68d647",
    "instruction": {
      "amount": 0.01,
      "beneficiary": "[email protected]",
      "callback": "",
      "currency": "USD",
      "equivalents": {
        "convert": "auto",
        "native": [
          "USDeq",
          "VTX"
        ],
        "proxy": [
          "USDC",
          "USDT"
        ]
      },
      "item": {
        "id": "READ12345",
        "oneoff": true,
        "realm": "example.com/my/webpage/12345",
        "type": "article",
        "validFor": 86400
      },
      "key": "HtFMpu8LQka2z9BP2BW7KZWn84pqFh2ZxB3ZU56Uo6yk",
      "metadata": {}
    },
    "signature": "3EsWt6QHfXxZi6tWNTtWRPpDaczK7BKHWYQSCiURhGDayKEzxTY2W8E2RFKWLHRGvKDRKaw8ZR1mtvPHNee7x5CW",
    "version": "1.0"
  }
}
'
{
  "entitlement": {
    "hash": "72d04a04868a87c8a52ebdc4feddaf3400d365588c488a88743688d2762a9211",
    "proof": {
      "access_period": {
        "start": "2024-09-01T12:05:56.112244Z"
      },
      "bearer": "Z7z883kjaEMEpPpxiiy2iDmGBcud",
      "bearer_key": "GKKPAB7n9GXj8fJr8mB7k9Maw6mesaQ9UyqE7Hk74tTC",
      "instruction": {
        "beneficiary": "[email protected]",
        "hash": "efa31e68e0cc1fc8d5447b6c5ea101c751381692f0b97e64fd5187f60b68d647",
        "realm": "example.com/my/webpage/12345"
      },
      "payment_details": {
        "paid_amount": "0.002",
        "paid_currency": "VTX",
        "txid": "VZ8Tgxj8TD98KwqHxPpuoNQkHkP5"
      }
    },
    "signature": "3BPBj6uZo5ajjFy12SGYiZq6zYcuD5djmNegMtKDKf2YTauRTiquyoNDFB4i44nrT2dEyL37Z5gmpxUwmvcDMzY6",
    "version": "1.0"
  }
}

Body

application/json

Combined offer and TX params

A combination of a Payment Offer and a Transaction Request

accept
TX Request · object
required

A transaction request object

Example:
{
"args": {
"payment_request_hash": "efa31e68e0cc1fc8d5447b6c5ea101c751381692f0b97e64fd5187f60b68d647"
},
"encrypted": "clear",
"function": "fastpay",
"id": "0191a7d4-d876-7927-8629-c8f1f9df8c55",
"key": "GKKPAB7n9GXj8fJr8mB7k9Maw6mesaQ9UyqE7Hk74tTC",
"law": "normal",
"signature": "2CbUf2P9bWhEfcSXw19ozKKhKEwuFqqn8UtCPQQ1zQ7yJG4hu9LEosPhNQAaVQQ4VQYiRB36kjEA4hMUtA8xhYSs",
"signer": "[email protected]",
"target": "pay.dev.veratix.io",
"ttl": 5000,
"version": "1.0"
}
offer
Payment Offer · object
required

Terms for payment to satisfy a condition, signed by the offerer

Example:
{
"hash": "efa31e68e0cc1fc8d5447b6c5ea101c751381692f0b97e64fd5187f60b68d647",
"instruction": {
"amount": 0.01,
"beneficiary": "[email protected]",
"callback": "",
"currency": "USD",
"equivalents": {
"convert": "auto",
"native": ["USDeq", "VTX"],
"proxy": ["USDC", "USDT"]
},
"item": {
"id": "READ12345",
"oneoff": true,
"realm": "example.com/my/webpage/12345",
"type": "article",
"validFor": 86400
},
"key": "HtFMpu8LQka2z9BP2BW7KZWn84pqFh2ZxB3ZU56Uo6yk",
"metadata": {}
},
"signature": "3EsWt6QHfXxZi6tWNTtWRPpDaczK7BKHWYQSCiURhGDayKEzxTY2W8E2RFKWLHRGvKDRKaw8ZR1mtvPHNee7x5CW",
"version": "1.0"
}

Response

200 - application/json

EntitlementResponse

entitlement
object
required