Link Search Menu Expand Document

Payment Activities

A Payment Activity records a transaction that has happened on a Payment Request.

Payment Activities are created when a Payment Request has been created, paid, or refunded.

Contents

Models

Payment Activity EXPERIMENTAL

Mandatory Fields

Field Type Description
type String See Activity Types below.
value Monetary The value of the payment activity. Must be positive.
paymentRequestId String The Payment Request’s id.
shortCode String The Payment Request’s short code.
merchantId String The Payment Request’s Merchant id.
merchantConfigId String The Payment Request’s Merchant Config id.
merchantAccountId String The Payment Request’s Merchant Account id.
merchantName String The Payment Request’s Merchant name.
createdAt Timestamp When the activity was created.
createdBy CRN The identity that created the activity.
paymentRequestCreatedBy CRN The identity that created the Payment Request.

Optional Fields

Field Type Description
assetType String The Asset Type for the “payment” or “refund” activity.

Activity Types

Name Description
request Payment Request was created.
payment Payment Request was paid.
refund Payment Request was refunded.

Operations

List Payment Activities EXPERIMENTAL

List payment activities for a merchant. Results are paginated and ordered by descending activity created date.

GET /api/payment-activities

curl -G https://service.centrapay.com/api/payment-activities \
  -H "Authorization: $jwt" \
  -d merchantId=5ee0c486308f590260d9a07f \
  -d pageKey=PaymentRequest#E9eXsErwA444qFDoZt5iLA|Activity#000000000000001|614161c4c4d3020073bd4ce8|2021-09-15T03:00:21.156Z \
  -d shortCode=123abc

Required Fields

Field Type Description
merchantId String The id of the Merchant the Payment Request is on behalf of.

Optional Fields

Field Type Description
pageKey String Used to retrieve the next page of items.
shortCode String The Payment Request’s short code.

Example response payload

{
  "nextPageKey": "PaymentRequest#E9eXsErwA444qFDoZt5iLA|Activity#000000000000001|614161c4c4d3020073bd4ce8|2021-09-15T03:00:21.156Z",
  "items": [
    {
      "type": "refund",
      "value": {
        "currency": "NZD",
        "amount": "600"
      },
      "assetType": "centrapay.nzd.main",
      "paymentRequestId": "MhocUmpxxmgdHjr7DgKoKw",
      "shortCode": "123abc",
      "merchantName": "Centrapay Café",
      "merchantId": "5ee0c486308f590260d9a07f",
      "merchantAccountId": "C4QnjXvj8At6SMsEN4LRi9",
      "merchantConfigId": "5ee168e8597be5002af7b454",
      "createdAt": "2021-06-12T01:17:00.000Z",
      "createdBy": "crn::user:0af834c8-1110-11ec-9072-3e22fb52e878",
      "paymentRequestCreatedBy": "crn::user:0af834c8-1110-11ec-9072-3e22fb52e878"
    },
    {
      "type": "payment",
      "value": {
        "currency": "NZD",
        "amount": "6190"
      },
      "assetType": "centrapay.nzd.main",
      "paymentRequestId": "MhocUmpxxmgdHjr7DgKoKw",
      "shortCode": "123abc",
      "merchantName": "Centrapay Café",
      "merchantId": "5ee0c486308f590260d9a07f",
      "merchantAccountId": "C4QnjXvj8At6SMsEN4LRi9",
      "merchantConfigId": "5ee168e8597be5002af7b454",
      "createdAt": "2021-06-12T01:16:00.000Z",
      "createdBy": "crn::user:da75ad90-9a5b-4df0-8374-f48b3a8fbfcc",
      "paymentRequestCreatedBy": "crn::user:0af834c8-1110-11ec-9072-3e22fb52e878"
    },
    {
      "type": "request",
      "value": {
        "currency": "NZD",
        "amount": "6190"
      },
      "paymentRequestId": "MhocUmpxxmgdHjr7DgKoKw",
      "shortCode": "123abc",
      "merchantName": "Centrapay Café",
      "merchantId": "5ee0c486308f590260d9a07f",
      "merchantAccountId": "C4QnjXvj8At6SMsEN4LRi9",
      "merchantConfigId": "5ee168e8597be5002af7b454",
      "createdAt": "2021-06-12T01:15:46.000Z",
      "createdBy": "crn::user:0af834c8-1110-11ec-9072-3e22fb52e878",
      "paymentRequestCreatedBy": "crn::user:0af834c8-1110-11ec-9072-3e22fb52e878"
    }
  ]
}