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/bepayment/api/v1/Payment/Subsequentpurchase
Request Parameters
Mandatory | Type | Name | Comment |
---|---|---|---|
Yes | String | transactionRef | Unique reference for the transaction. |
Yes | String | cardToken | Unique reference for the transaction. |
No | String | currency | Default to NGN if not passed, other currencies available are USD and GBP. |
Yes | Decimal | amount | Amount to be charged from the card. |
cardToken is part of the response from the callback.
Response Parameters
Field | Type | Description |
---|---|---|
statusCode | String | 90000 |
message | String | Validation Failed |
data | Object | List of validation errors |
responseCode | String | Code indicating the result of the transaction. |
responseDescription | String | Description of the transaction result. |
transactionReference | String | Reference for the transaction. |
channelTransactionReference | String | Reference provided by the payment channel. |
amount | Number | Amount charged. |
remittanceAmount | Number | Amount remitted. |
customerName | String | Name of the customer. |
bank | String | Bank associated with the transaction. |
transactionStatus | String | Detailed transaction status. |
submitTimeUtc | String | Time when the transaction was submitted (in UTC). |
reconciliationId | String | ID for reconciliation purposes. |
clientReferenceInformation | String | Client reference information. |
accountName | String | Name on the account used for the transaction. |
accountNo | String | Account number used for the transaction. |
maskedPan | String | Masked Primary Account Number of the card. |
cardExpiry | String | Encrypted card expiry details. |
errors | Array | List of any errors encountered. |
transactionId | String | Unique ID for the transaction. |
completedTimeUtc | String | Time when the transaction was completed (in UTC). |
canRetry | Boolean | Indicates if the transaction can be retried. |
callBackUrl | String | URL for callbacks. |
processorResponse | String | Response from the payment processor. |
processorTransactionId | String | Transaction ID from the processor. |
recurringCardToken | String | Token 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",
"channelTransactionReference": null,
"amount": 50000,
"remittanceAmount": 50000,
"customerName": "Test Payment",
"bank": null,
"transactionStatus": "Paid",
"submitTimeUtc": null,
"reconciliationId": null,
"clientReferenceInformation": null,
"accountName": null,
"accountNo": null,
"maskedPan": "462294******3705",
"cardExpiry": "U07ztgi5V7Gkrit2Zd6mLVaQEpFDpY2wMkKBuPY92nqp90/c78SYS1ojOY/+B3N5DDxu8kuKKCbZ/723JzweaQ==",
"errors": null,
"transactionId": "49d60000-48af-96b2-a74f-08dc8853e8d9",
"completedTimeUtc": "Jun 9th 2024 | 07:15am",
"canRetry": true,
"callBackUrl": "",
"processorResponse": null,
"processorTransactionId": null,
"recurringCardToken": "4f89ebb9-f98b-4c3c-82f6-2f9f2ff67ff2"
}
}