Initiate Payment

Initiate Payment

Use this endpoint to initiate a new payment transaction with either BENEFIT or MASTERCARD.

πŸš€ Endpoint Overview

MethodURL
POSThttps://init-vpay.venlabs.link/merchant/initiate-payment

Use this endpoint to begin a new payment session and receive a redirect link for the user.


Request Body

{
    "merchant_id": 160,
    "payment_provider":"mastercard",
    "amount": 10
}

Parameters

Field NameTypeRequiredDescription
payment_providerstringβœ…The payment provider (BENEFIT or MASTERCARD)
amountfloatβœ…Transaction amount (e.g., 100.50)
merchant_idstringβœ…Merchant_id (e.g., 12003)

Response Example

{
  "redirect_url": "https://benefit.example/pay?token=abc123 ",
  "track_id": "324njl-23oijid-nvniroi3-lndksd"
}

Error Responses

Status CodeDescription
400Invalid payment provider or missing merchant configuration
500Internal server error

⚠️ Make sure the merchant has configured credentials for the selected payment provider in advance.


Next

After initiating a payment, you can check its status using the /payment-status endpoint.