Payment Link

This API is used to create a simple payment link. All calls to this end point is to be made using your secret key gotten from your dashboard.

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

Sample Request


{
    "name": "Demo Otp Link",
    "hash": "mypaymentlink",
    "link_status": 1,
    "expire_by": "2023-04-26T11:22:08.587Z",
    "amounts": [
        {
            "amount": 4000,
            "currency_id": "NGN"
        }
    ],
    "description": "My description",
    "redirect_link": "https://fjfhgfd.com",
    "return_msg": "Successful"
}

POST https://sandbox-api-d.squadco.com/payment_link/otp

Request Body

{
    "status": 200,
    "success": true,
    "message": "Success",
    "data": {
        "name": "Demo Otp Link",
        "link_type": "otp",
        "hash": "mypaymentlink",
        "description": "My description",
        "currencies": null,
        "redirect_link": "https://squadco.com",
        "return_msg": "Successful",
        "support_email": null,
        "support_phone": null,
        "terms_condition": null,
        "return_policy": null,
        "pickup_location": null,
        "expire_by": "2021-04-26T11:22:08.587Z",
        "merchant_id": "SBN1EBZEQ8",
        "link_status": 0,
        "extra": null,
        "createdAt": "2022-08-08T09:24:41.269Z",
        "updatedAt": "2022-08-08T09:24:41.269Z",
        "archivedAt": null,
        "image_id": null,
        "image": null,
        "amounts": [
            {
                "amount": 4000,
                "currency_id": "NGN"
            }
        ]
    }
}

The payment link is a concatenation of the base URL: https://sandbox-pay.squadco.com/ and the hash selected when creating the payment link For instance, if the hash is mypaymentlink then the payment link will be https://sandbox-pay.squadco.com/mypaymentlink

GO LIVE - Production

To create payment link on production:

  1. kindly change the base URL of the endpoint from sandbox-api-d.squadco.com to api-d.squadco.com

  2. get production keys from your production environment on dashboard.squadco.com

  3. On production, the base URL for concatenation of the payment link needs to be changed from sandbox-pay.checkout.squadco.com/hash to pay.checkout.squadco.co/hash

Last updated