Create a payment intent
Welcome to the API documentation for the Little Pay API. This API allows you to integrate secure payment processing into your applications. Below, you will find detailed information on how to use the API according to your needs.
To process a payment you must first create a payment intent. This will return a payment intent object that you can use to process a payment.
This endpoint requires Basic Authentication using your merchant's clientId
and clientSecret
.
The key
field is a unique alphanumeric string (must not contain special characters) that is used to identify the payment intent.
The recommended length is 8-12 characters.
The expiresAt
field is an optional field that indicates the number of minutes after
which the payment intent will expire. The default is 30 minutes.
The default currency
is KES
.
You can also provide a callbackUrl
that will be called when the payment is completed.
The returnUrl
is an optional URL that the user will be redirected to after the payment is completed.
The metadata
.authenticationRedirectUrl
is an optional URL that the user will be redirected to after step up authentication (3D Secure) is completed.
//Loading request body...
{
"date": "2024-03-07T13:03:05.141Z",
"data": {
"reference": "",
"checkoutUrl": "",
"message": "Request processed successfully"
}
}
The reference
is the unique identifier for the payment intent. It is referred to as the intentId
in some parts of the documentation.
The checkoutUrl
is the URL that you can redirect the user to in order to complete the payment.