Terraswitch
  • Terraswitch - Get Started
  • Test & Live Environments
  • Onboarding as a Business
  • GUIDES
    • 🎾Authentication
    • 🧀Webhooks
    • 🫓Status & Responses
    • 🏉API Rate Limits
    • 🚀Transactions & Destinations
    • 🍊Testing Credentials
    • 🚐Crafting Metadata
  • API ENDPOINTS
    • Account
      • Get Account Details
      • Get Banks
      • Get Beneficiaries
      • Add Bank
      • Change Settlement Bank
    • Wallet
      • Get Wallet Details
      • Get Wallet Transactions
    • Collections
      • Checkout
        • Initialize Transaction
      • Transfer
        • Generate Account
      • Charge
        • Create Charge
        • Authorize Charge
        • Charge Authorization
      • Bank
        • Pay with Opay
    • Payout
      • Bank Transfer
      • Withdraw Money
    • Products
      • List Products
      • Search Products
      • Filter Products
      • Fetch Product
      • Create Product
      • Update Product
    • Subaccounts
      • List Subaccounts
      • Search Subaccounts
      • Filter Subaccounts
      • Fetch Subaccount
      • Create Subaccount
      • Update Subaccount
    • Payment Links
      • List Payment Links
      • List Payment Link Transactions
      • Search Payment Links
      • Filter Payment Links
      • Fetch Payment Link
      • Create Payment Link
      • Update Payment Link
      • Attach Payment Resource
      • Remove Subaccount
      • Enable Payment Link
      • Disable Payment Link
    • Invoices
      • List Invoices
      • Search Invoices
      • Filter Invoices
      • Fetch Invoice
      • Create Invoice
      • Update Invoice
      • Remove Invoice Item
    • Transactions
      • List Transactions
      • Search Transactions
      • Filter Transactions
      • Verify Transaction
    • Refunds
      • List Refunds
      • Fetch Refund
      • Create Refund
    • Bills Payment
      • List Mobile Networks
      • List Bill Categories
      • List Bill Sub-Categories
      • List Mobile Data Plans
      • Validate Biller
      • Validate Bill Status
      • Validate Top-Up Status
      • Buy Airtime
      • Buy Data
      • Pay Bill
    • Resources
      • List Banks
      • List Countries
      • Resolve Bank Account
Powered by GitBook
On this page
  1. API ENDPOINTS
  2. Payment Links

Filter Payment Links

Get a list of your subaccounts on Terraswitch.

POST {{ BASE_URL }}/v1/corporate/filter-payments

Optional Query Parameters

Property
Data Type
Description
Example

limit

string

Number of records per page

50

page

string

Page number to view

1

order

string

Arrangement of records in descending or ascending order

"asc" or "desc"

Body Parameters

Property
Data Type
Description
Example
Required

isEnabled

boolean

Specify filter value for the enabled status of the payment link

true

Yes, if no other field is specified

type

string

The type for a payment link. This can be fixed or dynamic

"fixed"

Yes if no other field is specified

feature

string

The feature of the payment link. This can either be request, product or invoice

"request"

Yes if no other field is specified

import Axios from 'axios';

// set the api url
const API_URL = `${BASE_URL}/v1/corporate/filter-subaccounts`;

// define request body
const data = {
    isEnabled: true,
    type: "fixed",
    feature: "request"
}

// make request using axios
Axios({
    method: "POST",
    url: `${API_URL}`,
    headers: {
        lg: 'en',
        ch: 'web'
        Authorization: `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
    },
    data: data
}).then((resp) => {
    console.log(resp)
}).catch((err) => {
    console.log(err)
})
{
    "error": false,
    "errors": [],
    "count": 1,
    "total": 1,
    "pagination": {},
    "data": [
        {
            "name": "Crowd Fund School",
            "slug": "crowd-fund",
            "link": "https://staging-web.terraswitch.com/link/crowd-fund",
            "qrcode": "https://storage.googleapis.com/concreap-buckets/qrcode-4ebc1b81",
            "redirectUrl": "",
            "feature": "request",
            "type": "fixed",
            "isEnabled": true,
            "message": "Thank you for your payment",
            "description": "",
            "amount": 5000,
            "totalAmount": 15000,
            "createdAt": "2024-01-13T05:39:48.624Z",
            "updatedAt": "2024-01-13T06:12:53.060Z",
            "options": {
                "card": true,
                "transfer": true,
                "bank": false,
                "ussd": false,
                "bankQR": false
            }
        }
    ],
    "message": "successful",
    "status": 200
}
PreviousSearch Payment LinksNextFetch Payment Link

Last updated 5 months ago