Dashboard

Recurring Payment allows businesses to set up subscription-based payments. This endpoint is used to make subsequent purchases using a stored card token obtained from a previous recurring payment. This is specifically for card transactions.

Request

METHOD: POST

Endpoint: <https://api.hydrogenpay.com/bepay/api/v1/Payment/Subsequentpurchase>

Request Parameters

MandatoryTypeNameComment
YesStringtransactionRefUnique reference for the transaction.
YesStringcardTokenUnique reference for the transaction.
NoStringcurrencyDefault to NGN if not passed, other currencies available are USD and GBP.
YesDecimalamountAmount to be charged from the card.

📘

cardToken is part of the response from the callback.

Response Parameters

FieldTypeDescription
statusCodeString90000
messageStringValidation Failed
dataObjectList of validation errors
responseCodeStringCode indicating the result of the transaction.
responseDescriptionStringDescription of the transaction result.
transactionReferenceStringReference for the transaction.
amountNumberAmount charged.
remittanceAmountNumberAmount remitted.
customerNameStringName of the customer.
transactionStatusStringDetailed transaction status.
maskedPanStringMasked Primary Account Number of the card.
cardExpiryStringEncrypted card expiry details.
transactionIdStringUnique ID for the transaction.
completedTimeUtcStringTime when the transaction was completed (in UTC).
canRetryBooleanIndicates if the transaction can be retried.
callBackUrlStringURL for callbacks.
recurringCardTokenStringToken for the recurring card.

Sample Request

{
  "transactionRef": "30002699_371243f9e2",
  "cardToken": "4f89ebb9-f98b-4c3c-82f6-2f9f2ff67ff2",
  "currency": "NGN",
  "amount": 50000
}

Sample Response

{
    "statusCode": "90000",
    "message": null,
    "data": {
        "responseCode": "0000",
        "responseDescription": "Approved by Financial Institution",
        "transactionReference": "30002699_371243f9e2",
        "amount": 50000,
        "remittanceAmount": 50000,
        "customerName": "Test Payment",
        "transactionStatus": "Paid",
        "maskedPan": "462294******3705",
        "cardExpiry": "U07ztgi5V7Gkrit2Zd6mLVaQEpFDpY2wMkKBuPY92nqp90/c78SYS1ojOY/+B3N5DDxu8kuKKCbZ/723JzweaQ==",
        "transactionId": "49d60000-48af-96b2-a74f-08dc8853e8d9",
        "completedTimeUtc": "Jun 9th 2024 | 07:15am",
        "canRetry": true,
        "callBackUrl": "",
        "recurringCardToken": "4f89ebb9-f98b-4c3c-82f6-2f9f2ff67ff2"
    }
}