Helpers

Retrieve or export all payment links

Retrieve a paginated list or export a CSV of all payment links. To export to CSV, change the request header's Accept value to text/csv.

For more information, see the documentation, and for sample calls, see the public Postman collection.

get/api/payments

Request

  • Base URL
    https://sandbox-l.ppay.io
  • URL
    https://sandbox-l.ppay.io/api/payments
  • Auth
    HTTP bearer

Query parameters

merchantstring
Example:9f6ea39b121d11e89d9774d4352a31dz

The unique merchant ID to scope the list to. Required if you're exporting payment links to CSV.

offsetinteger

The offset from which to read data.

perPageinteger

The amount of items to retrieve.

filters[startDate]string date-time
Example:2018-03-20T09:12:28Z

Retrieve all payment links from the start date onwards.

filters[endDate]string date-time
Example:2018-03-20T09:12:28Z

Retrieve all payment links until the end date.

filters[status]'initiated' | 'processing' | 'expired' | 'cancelled' | 'completed'
Example:initiated

The payment link status to filter on.

filters[amountValue]number
Example:100

The amount to filter by.

filters[amountOperator]'lt' | 'lte' | 'gt' | 'gte' | 'eq'
Example:lt

How to use the amountValue for filtering.

filters[sendingOptions]'sendEmail' | 'sendSms' | 'sendWhatsapp' | 'emailCc' | 'emailBcc'
Example:sendEmail

The sending option to filter on.

Response

Payment links successfully retrieved.

Example response

{
  "payments": [
    {
      "id": "b95d6888-591b-4538-b508-6102cf1259c9",
      "payment": {
        "linkId": "G56F5_ll",
        "linkUrl": "https://l.ppay.io/af6c33cce7fabefb",
        "amount": 123.45,
        "status": "completed",
        "currency": "ZAR",
        "merchantInvoiceId": "INV90001",
        "entityId": "8ac7a4ca77a64c9c0177af52972c13bd",
        "notes": "Please pay this at your earliest convenience.",
        "expiryTime": "2021-10-27T12:45:27Z",
        "batchId": "421e1e63-ddd5-46ec-8812-74eda861259b"
      },
      "source": "API",
      "createdAt": "2021-10-27T12:35:27Z",
      "updatedAt": "2021-10-27T12:45:43Z",
      "customer": {
        "givenName": "Grace",
        "surname": "Nkosi",
        "email": "grace.nkosi@example.com",
        "mobile": "+27123456789",
        "whatsapp": "+27123456789",
        "billing": {
          "street1": "123 Example Street",
          "city": "Cape Town",
          "state": "Western Cape",
          "postalCode": "7000",
          "country": "ZA"
        }
      },
      "options": {
        "emailCc": "ccexample@example.com",
        "emailBcc": "bccexample@example.com",
        "notificationUrl": "https://example.com/example-webhook/"
      },
      "checkout": {
        "defaultPaymentMethod": "CARD",
        "paymentType": "DB",
        "registrationId": "8ac7a4a180223d220180227b2cf649f0",
        "checkoutId": "d6a8014a622a442aad90c72320419b2b",
        "transactionUniqueId": "450bf3b1-c479-4b30-99ca-5b598a889b8f",
        "resultCode": "000.100.110",
        "paymentBrand": "VISA"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.