❗️

Kindly note that recurring payment is only applicable to card transactions.

Recurring Payment is an option in the payment gateway integration that allows businesses to schedule and automate regular debits from customers' cards. It enables businesses to set up recurring payment schedules based on various intervals such as daily, weekly, monthly, quarterly, or yearly.

This capability enhances the payment process, providing convenience for both businesses and customers. Businesses can generate recurring payment links, allowing customers to authorize automated card debits at predefined intervals. This feature is beneficial for subscription-based models and enhances payment efficiency while ensuring a consistent and convenient payment experience.

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.
NoStringcurrencyDefault to NGN if not passed, other currencies available are USD and GBP.
NoStringdescriptionPayment Description.
YesStringcustomerNameCustomer's Name
NoStringmetaIt contains 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.
NoNumberfrequencyNumber of days between each recurring transaction.
Daily = 0, Weekly = 1, Monthly =2, Quarterly = 3, Yearly = 4.
NoStringisRecurringBoolean indicates a recurring transaction.
NoDateendDateDate and time when the recurring transactions should end.

❗️

Use 5 for frequency to disable auto-debit and get recurringCardToken.

Success Response

FieldTypeValue
statusCodeInteger90000
messageStringInitiate Payment Saved Successfully.
transactionRefStringTransaction Client Reference
urlStringDeveloper 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,
  "email": "[email protected]",
  "currency": "NGN",
  "description": "test desc",
  "customerName": "Test Customer",
  "meta": "test meta",
  "callback": "https://hydrogenpay.com",
  "frequency": 3,
  "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"
    }
}

Subsequent Purchase

For cardToken, call the "Payment Confirmation" endpoint and get "recurringCardToken" from the response to be used as the cardToken for subsequent purchases.

Request Method: POST

🚧

Test URL: https://qa-api.hydrogenpay.com/bepay/api/v1/Payment/Subsequentpurchase

Live URL: https://api.hydrogenpay.com/bepay/api/v1/Payment/Subsequentpurchase

Request parameters

MandatoryTypeNameDescription
YesStringtransactionRef
YesStringcardToken
YesStringcurrency
YesStringamount

Sample Request

{
  "transactionRef": "abbadabbadu1",
  "cardToken": "282aff7d-4b74-4dc0-bc79-04398d805058",
  "currency": "NGN",
  "amount": 1
}

Sample Response

{
    "statusCode": "90000",
    "message": null,
    "data": {
        "responseCode": "0000",
        "responseDescription": "Approved by Financial Institution",
        "transactionReference": "abbadabbadu1",
        "channelTransactionReference": null,
        "amount": 1,
        "remittanceAmount": 1,
        "customerName": "Test Account",
        "bank": null,
        "status": "Paid",
        "submitTimeUtc": null,
        "reconciliationId": null,
        "clientReferenceInformation": null,
        "accountName": null,
        "accountNo": null,
        "maskedPan": "539923******5212",
        "cardExpiry": "1RBM9ofCXiwzEDnJhUDDsW3iHCCTBxICaArGQl+cb4UmFpZj1DuHIMS65M77wjfmhfRm3svkMexyPScfU3DriA==",
        "errors": null,
        "transactionId": "783f0000-2091-e6ce-ec79-08dc20c93135",
        "completedTimeUtc": "Jan 29th 2024 | 12:52pm",
        "canRetry": true,
        "callBackUrl": "",
        "processorResponse": null,
        "processorTransactionId": null,
        "recurringCardToken": "282aff7d-4b74-4dc0-bc79-04398d805058"
    }
}