PayNowPro
Products

Create Product

Creates a new product with optional prices.

POST
/products
api-key<token>

In: header

Request Body

application/json

Product creation data including name, description, tenantAlias, and optional prices

metadata?

Construct a type with a set of properties K of type T

prices?
expiresAt?string
active?boolean
tenantAlias*string
description*string
groupId?string
name*string

Response Body

application/json

application/json

application/json

curl -X POST "https://api.paynowpro.com/api/v1/products" \  -H "Content-Type: application/json" \  -d '{    "tenantAlias": "string",    "description": "string",    "name": "string"  }'
{
  "prices": [
    {
      "id": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "productId": "string",
      "recurring": {
        "executionDate": "string",
        "period": 0.1,
        "frequency": "Daily"
      },
      "details": {
        "amount": 0.1,
        "currency": "afn"
      }
    }
  ],
  "product": {
    "id": "string",
    "groupId": "string",
    "tenantAlias": "string",
    "name": "string",
    "active": true,
    "description": "string",
    "metadata": {
      "property1": null,
      "property2": null
    },
    "expiresAt": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
}
{
  "cause": null,
  "body": {
    "response": {
      "body": "string",
      "headers": {
        "property1": "string",
        "property2": "string"
      }
    },
    "request": {
      "body": "string",
      "headers": {
        "property1": "string",
        "property2": "string"
      },
      "url": "string",
      "method": "string"
    },
    "reason": "string",
    "code": 400
  }
}
{
  "cause": null,
  "body": {
    "response": {
      "body": "string",
      "headers": {
        "property1": "string",
        "property2": "string"
      }
    },
    "request": {
      "body": "string",
      "headers": {
        "property1": "string",
        "property2": "string"
      },
      "url": "string",
      "method": "string"
    },
    "reason": "string",
    "code": 400
  }
}