Change Log

  • 19-Jun-2024 | v7.0.0 | All new article

Contributors:

Adam Wilson - Logo Pogo

CRM Order Payments API

Create, Retrieve, Update and Delete CRM Order Payments within an Order via the public API endpoint using "where" filtering.

GET CRM Order Payments List

Retrieves a list of Order Payments as a JSON response based on your provided query parameters.

/api/v2/admin/orders/{id}/payments

Data / Response:

{
    "Where" : {},
    "Order_By" : "Id",
    "Offset" : 0,
    "Limit" : 100,
}
{
  "Items": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:40:25.699Z"
    }
  ],
  "TotalItemsCount": 0
}

POST CRM Order Payment Create

Creates a new Order Payment based on the provided data.

/api/v2/admin/orders/{id}/payments

Data / Response:

{
  "OrderId": "string",
  "Notes": "string",
  "PaymentType": "CreditCard",
  "Amount": 0,
  "CreatedDateTime": "2024-05-17T18:40:14.180Z"
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}

PUT CRM Order Payment Update

Updates a single Order Payment based on the ID passed in the endpoint URL and data provided.

/api/v2/admin/orders/payments/{id}

Data / Response:

{
  "Id": 0,
  "OrderId": "string",
  "Notes": "string",
  "PaymentType": "CreditCard",
  "Amount": 0
}
{
  "Id": 0,
  "AWBNumber": "string",
  "CurrencyCountry": "string",
  "Currency": "string",
  "Country": "string",
  "InvoiceDate": "2024-05-17T18:47:19.762Z",
  "InvoiceNumber": 0,
  "IsDeleted": true,
  "IsRecurring": true,
  "MainOrderId": 0,
  "MemberId": 0,
  "OrderName": "string",
  "PaymentState": "None",
  "StatusId": 0,
  "TotalCost": 0,
  "CreatedDateTime": "2024-05-17T18:47:19.762Z",
  "HasSubscriptions": true,
  "HasPaidSubscription": true,
  "TrackingURL": "string",
  "TransactionId": "string",
  "AmountPaid": 0,
  "AmountPending": 0,
  "OrderCaseType": "FormCase",
  "StatusShort": {
    "Id": 0,
    "Name": "string"
  },
  "Discount": {
    "Code": "string",
    "Cost": 0
  },
  "GiftVoucher": {
    "Name": "string",
    "Cost": 0
  },
  "Tax": {
    "Code": "string",
    "Rate": 0
  },
  "ShippingInfo": {
    "Name": "string",
    "Cost": 0,
    "Address": "string",
    "City": "string",
    "State": "string",
    "Zipcode": "string",
    "Country": "string"
  },
  "Member": {
    "Id": 0,
    "Email": "string",
    "FirstName": "string",
    "LastName": "string"
  },
  "OrderLines": [
    {
      "Id": 0,
      "EntityType": "Form",
      "ProductId": 0,
      "ModuleId": 0,
      "ProductName": "string",
      "Quantity": 0,
      "TaxRate": 0,
      "UnitPrice": 0,
      "TotalPrice": 0,
      "FileName": "string",
      "IsDownload": true,
      "Attributes": [
        {
          "AttributeId": 0,
          "OptionsIds": [
            "string"
          ]
        }
      ]
    }
  ],
  "Payments": [
    {
      "Id": 0,
      "Amount": 0,
      "AmountCaptured": 0,
      "GatewayReason": "string",
      "TransactionId": "string",
      "Status": "string",
      "PaymentType": "CreditCard",
      "PaymentGatewayType": "stripe",
      "Notes": "string",
      "CreatedDateTime": "2024-05-17T18:47:19.762Z"
    }
  ],
  "CustomCrmGroups": {
    "<GroupAlias1>": {
      "<FieldAlias1>": "<value>",
      "<FieldAlias2>": false,
      "<FieldAlias3>": 0
    }
  }
}

DELETE CRM Order Payment Delete

Deletes a single Order Payment based on the ID passed in the endpoint URL.

/api/v2/admin/orders/payments/{id}

Data / Response:

N/A
Status 204