Initiate Payment
This API allows you to initiate transaction by making calls from your server which returns a URL that when visited will call up our payment modal.
Last updated
This API allows you to initiate transaction by making calls from your server which returns a URL that when visited will call up our payment modal.
Last updated
Authorization Any request made without the authorization key (secret key) will fail with a 401
(Unauthorized)
response code.
If using other services such as dynamic virtual accounts, do not use the same transaction reference
The authorization key is sent via the request header as Bearer Token Authorization
Example: Authorization: Bearer sandbox_sk_94f2b798466408ef4d19e848ee1a4d1a3e93f104046f
POST
https://sandbox-api-d.squadco.com/transaction/initiate
This endpoint returns a checkout URL that when visited calls up the modal with the various payment channel.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
This allows you charge a card without collecting the card information each time
Authorization Any request made without the authorization key (secret key) will fail with a 401
(Unauthorized)
response code.
The authorization key is sent via the request header as Bearer Token Authorization
For recurring Payments test on Sandbox, ensure to use the test card: 5200000000000007
Example: Authorization: Bearer sandbox_sk_94f2b798466408ef4d19e848ee1a4d1a3e93f104046f
To tokenize a card, just add a flag to the initiate payload when calling the initiate endpoint and the card will automatically be tokenized. The unique token code will automatically be added to the webhook notification that will be received after payment.
This allows you to charge a card using the token generated during the initial transaction which was sent via webhook
POST
https://sandbox-api-d.squadco.com/transaction/charge_card
This endpoint allows you to query all transactions and filter using multiple parameters like transaction ref, start and end dates, amount, etc
N.B: The date parameters are compulsory and should be a maximum of one month gap
GET
https://sandbox-api-d.squadco.com/transaction
To go live, simply:
1. Change the base URL of your endpoints from sandbox-api-d.squadco.com to api-d.squadco.com
2. Sign up on our Live Environment
3. Complete your KYC
4. Use the secret key provided on the dashboard to replace the test keys gotten from the sandbox environment to authenticate your live transactions.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Authorization*
String
API keys (Secret Key) that authorizes your transactions and gotten from your squad dashboard
email*
String
Customer's email address.
amount*
Integer
The amount you are debiting customer (expressed in the lowest currency value - kobo
& cent
). 10000 = 100NGN for Naira Transactions
currency*
String
The currency you want the amount to be charged in. Allowed value is either NGN or USD
.
customer_name
String
Name of Customer carrying out the transaction
initiate_type*
String
This states the method by which the transaction is initiated. At the moment, this can only take the value "inline".
transaction_ref
String
An alphanumeric string that uniquely identifies a transaction
callback_url
String
Sample: http://squadco.com
payment_channels
Array
An array of payment channels to control what channels you want to make available for the user to make a payment with. Available channels include; ['card'
, 'bank'
,
'ussd'
,'transfer'
]
metadata
Object
Object that contains any additional information that you want to record with the transaction. The custom fields in the object
will be returned via webhook and the payment verification endpoint.
pass_charge
Boolean
It takes two possible values: True or False. It is set to False by default. When set to True, the charges on the transaction is computed and passed on to the customer(payer). But when set to False, the charge is passed to the merchant and will be deducted from the amount to be settled to the merchant.
sub_merchant_id
String
This is the ID of a merchant that was created by an aggregator which allows the aggregator initiate a transaction on behalf of the submerchant. This parameter is an optional field that is passed only by a registered aggregator.
amount*
Integer
Amount to charge from card in the lowest currency value. kobo for NGN transactions or cent for USD transactions
token_id*
String
A unique tokenization code for each card transaction and it is returned via the webhook for first charge on the card.
transaction_ref
String
Unique case-sensitive transaction reference. If you do not pass this parameter, Squad will generate a unique reference for you.
currency
string
transacting currency
amount
integer
transaction amount
perPage
integer
number of transactions to be displayed in a page
page
integer
shows which page you are on
end_date*
date
end date of transactions
start_date*
date
start date of transaction
reference
string
transaction ref of a transaction