Create Community API

This guide explains how to create Community through API call .

REQUEST

testing server:

POST https://staging.xpay.app/api/communities/create_community

production(Live) server:

POST https://staging.xpay.app/api/communities/create_community

Headers

Content-Type: multipart/form-data

Parameters

No params {/* #### Required Properties

Property nameValueDescriptionNotes
x-api-keystringAPI key linked to your communitygenerate API key

โ€‹

Request body

Required Properties

Property nameValueDescriptionNotes
namestringCommunity name
logofileimage for community logo "png, jpg"

Optional Properties

Property nameValueDescriptionNotes
app_modulesstringCheck allowed modules for community from list [Service, Bill, Event, Product, Training, Sport, Course]comma splitted string example "Service,Bill,...etc"
registered_namestringAlternative name for community
addressstringProvided address for community
emailstringan Email for community
phonestringPhone number for community
payment_methodsstringAllowed payment methods for community from list [Card, Kiosk, Meeza/Digital, Fawry, valu]comma splitted string example "Fawry,valu,...etc"
kiosk_processorstringKiosk payment through method [FAWRY, AMAN]default AMAN
wallet_processorstringWallet payment through method [Banque ElAhly (NBE), Banque Misr (BM), Orange Money(OM)]
redirect_successful_onlystringUrl for successful payment where redirect after success

Response

If successful, this method returns a response body with the following structure:

{
    "status": {
        "code": 200,
        "message": "success",
        "errors": []
    },
    "data": {},
    "count": null,
    "next": null,
    "previous": null
}

Example

{
    "name": "New Community",
    "app_modules": "event, service",
    "order_description": "Monthly rent payment", 
    "payment_methods": "card,fawry", 
    "logo": "logo.png", 
    "allowed_cards": "NBE", 
    "NBE_setting": {"integration_method": "DI", "merchant_id":"1234",  "api_password": "pass1234"}, 
}

Alt text

{
    "status": {
        "code": 200,
        "message": "success",
        "errors": []
    },
    "data": {},
    "count": null,
    "next": null,
    "previous": null
}