Billing/Billing

Create a new checkout session

POST
/billing/api/v1/paysession/create

Authorization

x-api-key<token>

In: header

Request Body

application/jsonRequired
paylinkIdRequiredstring
modeRequiredstring
metadataobject
successUrlstring
Format: "uri"
cancelUrlstring
Format: "uri"
failureUrlstring
Format: "uri"
curl -X POST "https://api.acta.link/billing/api/v1/paysession/create" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "paylinkId": "paylink_bE8ZndSer0o2Q9338q9mzUWS1Vdek3zO",
    "mode": "paylink",
    "metadata": {
      "xyz": "123",
      "mnq": "abc"
    },
    "successUrl": "https://example.com/success",
    "cancelUrl": "https://example.com/cancel",
    "failureUrl": "https://example.com/failure"
  }'

Checkout session created successfully

{
  "data": {
    "id": "checkout_mfUL0qrS9IhRXJXBu42JkdhO4tdLeqpX",
    "mode": "paylink",
    "status": "open",
    "orderId": "ord_pwCDubIAZYGzKJa5XztGrhAv31kX12cm",
    "orderStatus": "PENDING",
    "createdAt": "2025-08-29T15:36:36.346Z",
    "updatedAt": "2025-08-29T15:36:36.346Z",
    "expiresAt": "2025-08-29T16:36:36.348Z",
    "startedAt": null,
    "endAt": null,
    "name": "Recipe Pro",
    "paylinkType": "subscription",
    "paymentLink": "https://pay.acta.link/payment-link/paylink_6LDiorrwRDii8aU2B7ueSRPGIFEby6cr",
    "successUrl": "https://example.com/success",
    "cancelUrl": "https://example.com/cancel",
    "failureUrl": "https://example.com/failure",
    "url": "https://pay.acta.link/payment-link/checkout_mfUL0qrS9IhRXJXBu42JkdhO4tdLeqpX",
    "products": [
      {
        "id": "prod_LEYeql9qO7yAAxXJSUynmzL1QXWuo2or",
        "createdAt": "2025-08-29T15:23:18.164Z",
        "name": "Recipe Pro",
        "description": "Pro plan for Recipe",
        "imageUrl": "",
        "paymentType": "recurring",
        "status": "ACTIVE",
        "priceDetails": {
          "price": "0x302e3136",
          "currency": "USDC",
          "intervalCount": 3,
          "intervalUnit": "5mins",
          "currencyType": "crypto"
        }
      }
    ],
    "paymentMethods": [
      {
        "id": "paymethod_Ne22iCvTRkW7bnm6nRwbuSYKUXjrkOnN",
        "name": "Polygon USDC",
        "createdAt": "2025-08-12T11:57:36.863Z",
        "paymentType": "crypto",
        "paymentDetails": {
          "chainId": 137,
          "address": "0xEBFa37194fA74bA3e8195446948FC3B9c72E08AB",
          "isDefault": false
        }
      }
    ],
    "metadata": {
      "xyz": "123",
      "mnq": "abc"
    }
  }
}