Create Tuition

If a target country and university have been found by your user, the next step is most probably to initiate tuition payment. To achieve this, you will have to send a POST request to this endpoint:

Endpoint

{{baseurl}}/tuitions/create

Request parameters:

FieldData TypeDescription
amountNumber >= 2000Required. This specifies the amount of money to be paid. It must be a number greater than or equal to 2000.
countryStringRequired. The country where the university is located.
currencyStringRequired. The currency type to be used for the payment.
studentObject (CreateBeneficiaryDto)Required. The details of the beneficiary of the tuition payment.
typeString: Enum SCHOOL ACCOMODATIONRequired. The specific transaction type. It must be either “SCHOOL” or “ACCOMODATION”.
universityObject UniversitydtoRequired. The target university the tuition is intended for.
addressstringAddress of the person paying the tuition.
referencestringUniques idenfier of the user.
saveStudentbooleanThis is a yes/no value indicating whether to save the student information for future use.

Your request should look like this:

{
  "type": "SCHOOL",
  "country": "string",
  "university": {
    "name": "string",
    "accountName": "string",
    "accountNumber": "string",
    "accountBank": "string",
    "accountType": "SAVINGS",
    "sortCode": "string",
    "iban": "string",
    "swiftCode": "string",
    "UCASNumber": "string",
    "routingNumber": "string",
    "postCode": "string",
    "state": "string",
    "city": "string"
  },
  "address": "string",
  "amount": 2000,
  "reference": "string",
  "currency": {},
  "student": {
    "reference": "string",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "middleName": "string",
    "invoiceNumber": "string",
    "address": "string",
    "note": "string"
  },
  "saveStudent": true
}

If you got everything right, you should get this response.

{
  "success": true,
  "statusCode": 201,
  "message": "Tuition created successfully",
  "data": {
    "id": "d68c05d7-854a-4fb8-8f44-3dac7fd38ecc",
    "country": "GB",
    "university": {
      "iban": "123211",
      "name": "Payshiga University of London",
      "sortCode": "3737378",
      "swiftCode": "2928282",
      "UCASNumber": "ejhbe873bd83be93y36v",
      "accountName": "PLU bank of the GB",
      "accountType": "SAVINGS",
      "accountNumber": "37383837329"
    },
    "createdAt": "2024-04-25T06:22:48.443Z",
    "updatedAt": "2024-04-25T06:22:50.361Z",
    "deletedAt": null,
    "type": "SCHOOL",
    "currency": "GBP",
    "studentId": "e6372fea-5943-479a-a12a-f4b4fdaeb0ab",
    "businessId": "0bb1dfc6-a74c-4e53-b41a-4a0c1eab188e",
    "reference": "shiga_business_12345",
    "transaction": {
      "id": "4945bf9f-68bc-4e0b-988f-7c71821895a6",
      "amount": 1000,
      "status": "PENDING",
      "fee": 0,
      "description": "Tuition",
      "type": "CREDIT",
      "medium": "API",
      "method": null,
      "currency": "GBP",
      "createdAt": "2024-04-25T06:22:48.443Z",
      "updatedAt": "2024-04-25T06:22:48.443Z",
      "businessId": "0bb1dfc6-a74c-4e53-b41a-4a0c1eab188e",
      "reference": "shg_tr_7ca4294c-36c9-42cf-8eb4-349a4dfe8d09",
      "depositId": null,
      "spendingId": null,
      "refundId": null,
      "topupId": null,
      "tuitionId": "d68c05d7-854a-4fb8-8f44-3dac7fd38ecc",
      "walletId": null,
      "cardId": null,
      "swapId": null,
      "balance": null
    }
  }
}