Buy Exam Pin
quantity
: exam quantityint
exam_name
: Exam namestring
import requests
import json
payload = {
"quantity": 1,
"exam_name": "NECO"
}
user_token = 'eacf1ab727d134b254361d834c28a2bf6ab0a111'
headers = {
"Content-Type": "application/json",
"Authorization": f'Token {user_token}'
}
# jsonify the payload
data = json.dumps(payload)
Send a post request with the payload
url = "https://subpadi.com/api/epin/"
res = requests.post(url, data=data, headers=headers)
Response
{
"id": 24,
"exam": "NECO",
"quantity": 1,
"pin": "[26362054405982757802]",
"amount": 1000,
"pay_amount": "1050.0",
"tran_id": "EXAM2OYY--cf3b7",
"status": "successful",
"refund": false,
"date_created": "2023-12-27T07:19:07.544254",
"ident": "X8nI-jtA11f026"
}
View code in other programming languages here