Comment on page
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.
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
Example:
Authorization: Bearer sandbox_sk_94f2b798466408ef4d19e848ee1a4d1a3e93f104046f
post
https://sandbox-api-d.squadco.com
/transaction/initiate
{
"amount":43000,
"email":"[email protected]",
"currency":"NGN",
"initiate_type": "inline",
"transaction_ref":"4678388588350909090AH",
"callback_url":"http://squadco.com"
}
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
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.
"is_recurring":true
{
"amount":43000,
"email":"[email protected]",
"currency":"NGN",
"initiate_type": "inline",
"transaction_ref":"bchs4678388588350909090AH",
"callback_url":"http://squadco.com",
"is_recurring":true
}
This allows you 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
{
"amount":10000,
"token_id":"tJlYMKcwPd",
}
To go live, simply:
1. Change the base URL of your endpoints from sandbox-api-d.squadco.com to
api-d.squadco.com
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.
Last modified 21d ago