Generate card payment context
This steps is required to complete the card payment processing. it involve generating the card payment context.
POST: v1/payment/get-capture-context
Headers
secret-key
string
Your Vesicash secret key
public-key
string
Your Vesicash public key
Request body
currency (string): The currency for the payment.
country (string): The country for the payment.
narration (string): Description or reason for the payment.
method (string): The payment method to be used.
amount (number): The amount of the payment.
customer_first_name (string): The first name of the customer.
customer_last_name (string): The last name of the customer.
account_number (string): The customer's account number.
Request
For example, you can make a post request to the endpoint above and pass in the raw json data below to create a one-off transaction.
"amount": 250.00,
"currency": "GHS",
"country": "GH",
"narration": "Payment for order #12345",
"reference": "your-unique-internal-ref-12345",
"method": "card",
"operator": "mpgs",
"redirect_url": "https://your-shop.com/payment/success",
"webhook_url": "{{webhook_url}}"
}Response
{
"status": "success",
"code": 200,
"message": "success",
"data": {
"message": "success",
"capture_token": "eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0.eyJmbHgi***************************************
}
}The capture_token will be used to initialize the microform on the Generate card payment token endpoint.
Last updated