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. Collections

Charge

The Terraswitch Charge-API allows you to collect card payments seamlessly via APIs. These APIs are available for all businesses on our platform but only enabled for selected businesses based on compliance and certifications. Below are the three powerful APIs that helps you collect card payments easily.

API Name
Description

Allows you to initiate charge or a debit on a Debit card.

Authorize every charge you initiate based on response from creating a charge

Allows you to collect recurring payments from a card without initiating a charge.

For every charge created, there will be a need to authorize that charge and to do so, you will have to understand the structure of the API response from the create-charge endpoint. Below is a sample response and explanation.

{
  error: false,
  errors: [],
  data: {
    nextStep: "card PIN is required",
    displayText: "enter card pin",
    status: "pending",
    reference: "TSXA96227AAAB93491B",
    type: "pin",
    path: "send_pin",
    url: "",
    statusCode: 206,
    metadata: {
      reference: "TSXA96227AAAB93491B",
      type: "send_pin"
    }
  },
  message: "enter card pin",
  status: 206
}
Property
Description

nextStep

Specifies the next step of authorization

displayText

Specifies what should be displayed on the screen to customer or user

status

Specifies the status of the transaction

reference

Specifies the transaction reference

type

Specifies the authorization type

url

Specifies redirect url, should in case 3DS auth is needed

statusCode

specifies the current status code in the charge stage

PreviousGenerate AccountNextCreate Charge

Last updated 11 months ago

Create Charge
Authorize Charge
Charge Authorization