๐Ÿ“˜

Recurring Payment is only available for card transactions and not transfers.

Recurring Payment allows businesses to set up subscription-based payments. This operation collects essential details to create a recurring payment request, including the amount, currency, customer details, and subscription frequency. Customers can use this request to generate payment links, enabling the completion of payments through any payment card provider.

This payment request supports Mastercard, Visa, and Verve cards for transactions in NGN (Nigerian Naira) and USD (United States Dollar).

Request

METHOD: POST

โ˜‘๏ธ

Test URL: https://qa-dev.hydrogenpay.com/qa/bepay/api/v1/merchant/initiate-payment

โœ…

Live URL: https://api.hydrogenpay.com/bepay/api/v1/merchant/initiate-payment

Request parameters

MandatoryTypeNameComment
YesDecimalamountAmount to debit the customer.
YesEmailemailCustomerโ€™s Email Address.
YesStringcustomerNameCustomer's name.
NoStringcurrencyDefault to NGN if not passed, other currencies available are USD and GBP.
NoStringdescriptionPayment Description.
NoStringmetaContains any other information you want to be recorded with the transaction.
NoStringtransactionRefUnique transaction ref for Payment. It will be automatically generated for you if you don't specify.
YesStringcallbackRedirect URL after payment has been completed on the gateway.
YesStringfrequencyFrequency of recurring payment: 0 - Daily, 1 - Weekly, 2 - Monthly, 3 - Quarterly, 4 - Yearly, 5 - Disable auto debit.
YesBooleanisRecurringIndicates if the payment is recurring.
YesStringendDateEnd date for the recurring payment cycle in ISO 8601 format (e.g., 2024-10-29T19:01:41.745Z).

๐Ÿ‘

Set frequency to 5 if you would like to charge the cards for subsequent purchase manually.

Success Response

FieldTypeValue
statusCodeInteger90000
messageStringInitiate Payment Saved Successfully.
transactionRefStringTransaction Client Reference
urlStringPayment gateway redirect URL

Missing Callback Response

FieldTypeValue
statusCodeString10001
messageStringCallback is Required
dataObjectnull

Invalid Currency Response

FieldTypeDescription
statusCodeString10001
messageStringInvalid Currency
dataObjectnull

Missing Field Response

FieldTypeDescription
statusCodeString400
successBooleanfalse
messageStringValidation Failed
errorObjectList of validation errors

Sample Request

{
  "amount": 50,
  "customerName": "Dev Test",
  "email": "[email protected]",
  "currency": "NGN",
  "description": "test desc",
  "meta": "test meta",
  "callback": "https://hydrogenpay.com",
  "frequency": 1,
  "isRecurring": true,
  "endDate": "2024-10-29T19:01:41.745Z"
}

Sample Response

{
    "statusCode": "90000",
    "message": "Initiate payment Saved successfully.",
    "data": {
        "transactionRef": "503021992595_93766192e1",
        "url": "https://qa-gateway.hydrogenpay.com?transactionId=b3736f70-f930-4170-8160-e7a4a4a2d4b8"
    }
}