Create subscription

post
Create Subscription

https://seerbitapi.com/api/v2/recurring/subscribes
Authentication Mode is by passing encrypted merchant secret key in the header
Request
Response
Request
Path Parameters
publicKey
required
string
this is the merchant public key
amount
required
string
This is the amount to be paid
currency
required
string
This is the currency the transaction is to be carried out in
paymentReference
required
string
This is the unique identifier for a transaction to be generated by merchant
email
required
string
This is the email of the customer
productID
optional
string
This is the product ID entered by the merchant
productDescription
optional
string
This is the product description supplied by the merchant
callbackUrl
required
string
This is the callback url supplied by the merchant so that seerbit can redirect back to it
expirymonth
required
string
This is the card's expiry month
expiryyear
required
string
This is the card's expiry year
redirectLink
optional
string
This is returned when the payment link service is called
cardName
optional
string
This is the name of the customer
planID
optional
string
The plan ID represents a product the customer wants to pay for e.g Tithe, IELTS
linkingReference
optional
string
This is the internal gateway response
cvv
required
string
this is the 3 digit code behind the debit card
cardNumber
required
string
This is the debit card number
customerID
required
string
This is the reference unique to the customers
deviceType
optional
string
This is the type of device used by the customer
startDate
required
string
This is the day to commence billing of customers
paymentType
required
string
This indicates the type of payment instrument used
country
required
string
This is the country the customer is doing transaction from
billingPeriod
required
string
This is the number of times seerbit will do a recurrent billing
billingCycle
required
string
This is the rate of reoccurrence of the charge to the tokenized card
mobileNumber
optional
string
This is the customer's phone number
pin
required
string
This is the card pin
type
required
string
This is the authentication type {PIN, 3DSECURE}
Response
200: OK
Response
{
"status": "SUCCESS",
"data": {
"code": "S20",
"payments": {
"paymentReference": "WQ6676yPOpr12348o",
"linkingReference": "F194900041578648252258",
"redirectUrl":
"https://staging.seerbitapigateway.com/seerbit/card-dispatch?sredref=F19 4900041578648252258"
},
"message": "Transaction is pending"
}
}
Request
URL: https://seerbitapi.com/api/v2/recurring/subscribes
Authorization: Bearer SECRET_KEY
"Content-Type: application/json"
{
"publicKey":"SBTESTPUBK_PjQ5dFOi522L383MlsQYUMAe6cZYviTF", "paymentReference":"WQ6676yPOpr12348o", "planId":"ae702f51220000722dca", "cardNumber":"2223000000000007",
"expiryMonth":"05", "callbackUrl":"https://checkout.seerbitapi.com", "expiryYear":"21",
"cvv":"100",
"amount":"20",
"currency":"NGN",
"productDescription":"Test Token",
"productId":"Terrain",
"country":"NG",
"startDate":"2019-01-11",
"cardName":"Bola Olat",
"billingCycle":"DAILY", "email":"akintoyekolawole@gmail.com", "mobileNumber":"09022323537", "customerId":"199721652416534",
"pin":"####",
"type":"3DSECURE",
"billingPeriod":"4"
}

To complete this transaction, merchant is expected to redirect to the 3DSecure site via the redirect URL provided with the response above. However if the redirect url is not returned and the code is S20 and the message is Transaction is pending, the Validate OTP endpoint should be called as customer would have received a token either by email or phone number.

To get the subscription created or the status of a subscription for the customer, the GET Subscription endpoint is called by passing the paymentReference as billingID.