- Go to url https://registry.becknprotocol.io/login and to login with your google account.
- Go to url https://registry.becknprotocol.io/network_participants/blank and create network Participant Id.
- Go to url https://registry.becknprotocol.io/network_participants/index and edit the created Participant Id.
- On the edit page of Network Participant, go to Network Role tab and click on Add (+) button and create a new Network Role by filling below details:
- Network domain: Domain for which BAP will be triggered.
- Type: BAP.
- Subscriber Id: Same as Participant Id.
- Url: Public server address of BAP network.
- Status: SUBSCRIBED.
- After filling it up, hit the Done button.
- On the edit page of Network Participant, go to Participant Key tab and click on Add (+) button and create a new Participant Key by filling below details:
- Network Participant: Same as Participant Id.
- Key Id: unique string value.
- Signing Public Key: Get this from default.yml file (publicKey).
- Encr Public Key: Same as Signing Public Key (above field).
- Valid From: Select the start date.
- Valid Until: Select the end date.
- Verified: Check this to make it verified
- After filling it up, hit the Done button.
- Go to url https://registry.becknprotocol.io/login and to login with your google account.
- Go to url https://registry.becknprotocol.io/network_participants/blank and create network Participant Id.
- Go to url https://registry.becknprotocol.io/network_participants/index and edit the created Participant Id.
- On the edit page of Network Participant, go to Network Role tab and click on Add (+) button and create a new Network Role by filling below details:
- Network domain: Domain for which BPP will be triggered.
- Type: BPP.
- Subscriber Id: Same as Participant Id.
- Url: Public server address of BPP network.
- Status: SUBSCRIBED.
- After filling it up, hit the Done button.
- On the edit page of Network Participant, go to Participant Key tab and click on Add (+) button and create a new Participant Key by filling below details:
- Network Participant: Same as Participant Id.
- Key Id: unique string value.
- Signing Public Key: Get this from default.yml file (publicKey).
- Encr Public Key: Same as Signing Public Key (above field).
- Valid From: Select the start date.
- Valid Until: Select the end date.
- Verified: Check this to make it verified
- After filling it up, hit the Done button.
- Postman
- Ngrok
- Tunel
- MongoDB and Rabbit MQ
- Redis. Version 3.x or higher is required.
- Docker
- GitHub CLI
- Git
- Node.js. Version 16.x or higher is recommended.
- NPM. Version 5.x or higher is recommended.
- Yarn
- Typescript. Version 3.x or higher is recommended.
We need to setup BAP Client, BAP Network, BPP Client and BPP Network. Find the setup guide for these 4 Protocol Server below.
- Clone the repo
git clone https://github.com/beckn/protocol-server.git protocol-server-bap-client
- Go to cloned repo folder
cd protocol-server-bap-client
- Switch to branch
git checkout v2-0.9.4-fix
- Copy the config
cp config/config-sample-client-localhost.yaml config/default.yml
- Do the following configuration in
config/default.yml
file
- Configure the port on which protocol server bap client will listen
server:
port: 5001
- Configure the Redis cache
cache:
host: "127.0.0.1"
port: 6379
ttl: "PT10M"
# Optional. Default is 0.
db: 1
- Configure the
responseCache
'smongoURL
with working connection string
responseCache:
mongoURL: "mongodb://username:[email protected]:27017/ps?authSource=admin"
- Configure the
client
'smongoURL
with working connection string
client:
synchronous:
mongoURL: "mongodb://username:[email protected]:27017/ps?authSource=admin"
- Keep
app
'smode
asbap
# Mandatory.
app:
# Mandatory.
mode: bap
- Configure the
amqpURL
below.amqpURL
refers to theRabbitMQ
connection URI. keepmode
asclient
# Two types of gateway mode present.
# client and network.
gateway:
mode: client
inboxQueue: "inbox"
outboxQueue: "outbox"
amqpURL: "amqp://username:[email protected]:5672"
- Keep the
action
as below
# Mandatory.
actions:
requests:
search:
ttl : "PT20S"
init:
ttl : "PT20S"
select:
ttl : "PT20S"
confirm:
ttl : "PT20S"
status:
ttl: "PT20S"
track:
ttl: "PT20S"
support:
ttl: "PT20S"
update:
ttl: "PT20S"
cancel:
ttl: "PT20S"
rating:
ttl: "PT20S"
get_cancellation_reasons:
ttl: "PT20S"
get_rating_categories:
ttl: "PT20S"
responses:
on_search:
ttl: "PT20S"
on_init:
ttl: "PT20S"
on_select:
ttl: "PT20S"
on_confirm:
ttl: "PT20S"
on_status:
ttl: "PT20S"
on_track:
ttl: "PT20S"
on_support:
ttl: "PT20S"
on_update:
ttl: "PT20S"
on_cancel:
ttl: "PT20S"
on_rating:
ttl: "PT20S"
cancellation_reasons:
ttl: "PT20S"
rating_categories:
ttl: "PT20S"
- You can run the command
npm run generate-keys
to generateprivateKey
andpublicKey
and put in below config
# Mandatory.
privateKey: "K+/Oo4ama1wditbhQTFYg9g6RoSR4GPDbrSszXh6giBqxGJWMgQdzbK7q6eB/6gdIcep/FRzx8DQGPw2OOFm3Q=="
publicKey: "asRiVjIEHc2yu6ungf+oHSHHqfxUc8fA0Bj8NjjhZt0="
- Please find the
subscriberId
inParticipant Key
tab ofNetwork Participant
edit page ofBeckn Protocol Registry
. Also find thesubscriberUri
inNetwork Role
tab ofNetwork Participant
edit page ofBeckn Protocol Registry
# Mandatory.
# Mandatory.
subscriberId: "beckn-sandbox-bap.becknprotocol.io"
subscriberUri: "https://e3dd-2409-4063-429d-613a-e975-c421-884f-ff31.ngrok-free.app"
- Configure the
uniqueKey
. You can find theuniqueKey
inParticipant Key
tab ofNetwork Participant
ofBeckn Protocol Registry
registryUrl: https://registry.becknprotocol.io/subscribers
auth: false
uniqueKey: "beckn-sandbox-bap-key.becknprotocol.io"
- Keep below configuration as it is.
# Mandatory.
city: "std:080"
country: "IND"
# Mandatory.
ttl: "PT10M"
# Mandatory.
httpTimeout: "PT3S"
httpRetryCount: 2
- Execute the command
npm run install
to npm packages. - Execute the command
npm run dev
to start the server.
- Clone the repo
git clone https://github.com/beckn/protocol-server.git protocol-server-bap-network
- Go to cloned repo folder
cd protocol-server-bap-network
- Switch to branch
git checkout v2-0.9.4-fix
- Copy the config
cp config/config-sample-network-localhost.yaml config/default.yml
- Do the following configuration in
config/default.yml
file
-
Configure the port on which bap protocol server network will listen
server: port: 6002
-
Configure the Redis cache
cache: host: "127.0.0.1" port: 6379 ttl: "PT10M" # Optional. Default is 0. db: 1
-
Configure the
responseCache
'smongoURL
with working connection stringresponseCache: mongoURL: "mongodb://username:[email protected]:27017/ps?authSource=admin"
-
Configure the
client
'smongoURL
with working connection stringclient: synchronous: mongoURL: "mongodb://username:[email protected]:27017/ps?authSource=admin"
-
Keep
app
'smode
asbap
# Mandatory. app: # Mandatory. mode: bap
-
Configure the
amqpURL
below.amqpURL
refers to theRabbitMQ
connection URI. Keepmode
asnetwork
.inboxQueue
andoutboxQueue
should be same asProtocol Server BAP Client
'sinboxQueue
andoutboxQueue
.# Two types of gateway mode present. # client and network. gateway: mode: network inboxQueue: "inbox" outboxQueue: "outbox" amqpURL: "amqp://username:[email protected]:5672"
-
Keep the
action
as below# Mandatory. actions: requests: search: ttl : "PT20S" init: ttl : "PT20S" select: ttl : "PT20S" confirm: ttl : "PT20S" status: ttl: "PT20S" track: ttl: "PT20S" support: ttl: "PT20S" update: ttl: "PT20S" cancel: ttl: "PT20S" rating: ttl: "PT20S" get_cancellation_reasons: ttl: "PT20S" get_rating_categories: ttl: "PT20S" responses: on_search: ttl: "PT20S" on_init: ttl: "PT20S" on_select: ttl: "PT20S" on_confirm: ttl: "PT20S" on_status: ttl: "PT20S" on_track: ttl: "PT20S" on_support: ttl: "PT20S" on_update: ttl: "PT20S" on_cancel: ttl: "PT20S" on_rating: ttl: "PT20S" cancellation_reasons: ttl: "PT20S" rating_categories: ttl: "PT20S"
-
Configure
privateKey
andpublicKey
. GetprivateKey
andpublicKey
fromprotocol-server-bap-client/config/default.yml
# Mandatory.
privateKey: "K+/Oo4ama1wditbhQTFYg9g6RoSR4GPDbrSszXh6giBqxGJWMgQdzbK7q6eB/6gdIcep/FRzx8DQGPw2OOFm3Q=="
publicKey: "asRiVjIEHc2yu6ungf+oHSHHqfxUc8fA0Bj8NjjhZt0="
- Configure the
uniqueKey
. You can find theuniqueKey
inParticipant Key
tab ofNetwork Participant
ofBeckn Protocol Registry
registryUrl: https://registry.becknprotocol.io/subscribers
auth: false
uniqueKey: "beckn-sandbox-bap-key.becknprotocol.io"
- Keep below configuration as it is.
# Mandatory.
city: "std:080"
country: "IND"
# Mandatory.
ttl: "PT10M"
# Mandatory.
httpTimeout: "PT3S"
httpRetryCount: 2
- Execute the command
npm run install
to npm packages. - Execute the command
npm run dev
to start the server. - Make the BAP Network server publicly accessible by using6. Execute the command
npm run dev
to start the server. tools like localtunnel, ngrok, loophole. This public url will be used inconfig/default.yml
andBeckn registry
.
- Clone the repo
git clone https://github.com/beckn/protocol-server.git protocol-server-bpp-client
- Go to cloned repo folder
cd protocol-server-bpp-client
- Switch to branch
git checkout v2-0.9.4-fix
- Copy the config
cp config/config-sample-client-localhost.yaml config/default.yml
- Do the following configuration in
config/default.yml
file
-
Configure the port on which bpp protocol server client will listen
server: port: 6001
-
Configure the Redis cache
cache: host: "127.0.0.1" port: 6379 ttl: "PT10M" # Optional. Default is 0. db: 1
-
Configure the
responseCache
'smongoURL
with working connection string. This has to use different database than bpp.responseCache: mongoURL: "mongodb://username:[email protected]:27017/ps-bpp?authSource=admin"
-
Comment the
client
'ssynchronous
behaviour and usewebhook
'surl
as shown below. Webhook url is public url of webhook serverclient: # synchronous: # mongoURL: "mongodb://username:[email protected]:27017/ps-bpp?authSource=admin" webhook: url: "https://831a1a7471f8286e0cf42a22c74be341.loophole.site"
-
Keep
app
'smode
asbpp
# Mandatory. app: # Mandatory. mode: bpp
-
Configure the
amqpURL
below.amqpURL
refers to theRabbitMQ
connection URI. Also keepmode
asclient
. Also configureinboxQueue
andoutboxQueue
as below.# Two types of gateway mode present. # client and network. gateway: mode: client inboxQueue: "inbox-bpp" outboxQueue: "outbox-bpp" amqpURL: "amqp://username:[email protected]:5672"
-
Keep the
action
as below# Mandatory. actions: requests: search: ttl : "PT20S" init: ttl : "PT20S" select: ttl : "PT20S" confirm: ttl : "PT20S" status: ttl: "PT20S" track: ttl: "PT20S" support: ttl: "PT20S" update: ttl: "PT20S" cancel: ttl: "PT20S" rating: ttl: "PT20S" get_cancellation_reasons: ttl: "PT20S" get_rating_categories: ttl: "PT20S" responses: on_search: ttl: "PT20S" on_init: ttl: "PT20S" on_select: ttl: "PT20S" on_confirm: ttl: "PT20S" on_status: ttl: "PT20S" on_track: ttl: "PT20S" on_support: ttl: "PT20S" on_update: ttl: "PT20S" on_cancel: ttl: "PT20S" on_rating: ttl: "PT20S" cancellation_reasons: ttl: "PT20S" rating_categories: ttl: "PT20S"
-
Run the command
npm run generate-keys
to generateprivateKey
andpublicKey
and put in below config# Mandatory. privateKey: "K+/Oo4ama1wditbhQTFYg9g6RoSR4GPDbrSszXh6giBqxGJWMgQdzbK7q6eB/6gdIcep/FRzx8DQGPw2OOFm3Q==" publicKey: "asRiVjIEHc2yu6ungf+oHSHHqfxUc8fA0Bj8NjjhZt0="
-
Configure the
uniqueKey
. You can find theuniqueKey
inParticipant Key
tab ofNetwork Participant
ofBeckn Protocol Registry
registryUrl: https://registry.becknprotocol.io/subscribers auth: false uniqueKey: "beckn-sandbox-bpp-key.becknprotocol.io"
-
Keep below configuration as it is.
# Mandatory.
city: "std:080"
country: "IND"
# Mandatory.
ttl: "PT10M"
# Mandatory.
httpTimeout: "PT3S"
httpRetryCount: 2
- Execute the command
npm run install
to npm packages. - Execute the command
npm run dev
to start the server.
- Clone the repo
git clone https://github.com/beckn/protocol-server.git protocol-server-bpp-network
- Go to cloned repo folder
cd protocol-server-bap-network
- Switch to branch
git checkout v2-0.9.4-fix
- Copy the config
cp config/config-sample-network-localhost.yaml config/default.yml
- Do the following configuration in
config/default.yml
file
-
Configure the port on which protocol server bpp network will listen
server: port: 6002
-
Configure the Redis cache
cache: host: "127.0.0.1" port: 6379 ttl: "PT10M" # Optional. Default is 0. db: 1
-
Configure the
responseCache
'smongoURL
with working connection stringresponseCache: mongoURL: "mongodb://username:[email protected]:27017/ps?authSource=admin"
-
Comment the
client
'ssynchronous
behaviour and usewebhook
'surl
as shown below. Webhook url is public url of webhook serverclient: # synchronous: # mongoURL: "mongodb://username:[email protected]:27017/ps-bpp?authSource=admin" webhook: url: "https://831a1a7471f8286e0cf42a22c74be341.loophole.site"
-
Keep
app
'smode
asbpp
# Mandatory
app:
# Mandatory
mode: bpp
- Configure the
amqpURL
below.amqpURL
refers to theRabbitMQ
connection URI. Keepmode
asnetwork
.inboxQueue
andoutboxQueue
should be same asProtocol Server BPP Client
'sinboxQueue
andoutboxQueue
.
# Two types of gateway mode present.
# client and network.
gateway:
mode: network
inboxQueue: "inbox-bpp"
outboxQueue: "outbox-bpp"
amqpURL: "amqp://username:[email protected]:5672"
- Keep the
action
as below
# Mandatory.
actions:
requests:
search:
ttl : "PT20S"
init:
ttl : "PT20S"
select:
ttl : "PT20S"
confirm:
ttl : "PT20S"
status:
ttl: "PT20S"
track:
ttl: "PT20S"
support:
ttl: "PT20S"
update:
ttl: "PT20S"
cancel:
ttl: "PT20S"
rating:
ttl: "PT20S"
get_cancellation_reasons:
ttl: "PT20S"
get_rating_categories:
ttl: "PT20S"
responses:
on_search:
ttl: "PT20S"
on_init:
ttl: "PT20S"
on_select:
ttl: "PT20S"
on_confirm:
ttl: "PT20S"
on_status:
ttl: "PT20S"
on_track:
ttl: "PT20S"
on_support:
ttl: "PT20S"
on_update:
ttl: "PT20S"
on_cancel:
ttl: "PT20S"
on_rating:
ttl: "PT20S"
cancellation_reasons:
ttl: "PT20S"
rating_categories:
ttl: "PT20S"
- Configure
privateKey
andpublicKey
. GetprivateKey
andpublicKey
fromprotocol-server-bpp-client/config/default.yml
# Mandatory.
privateKey: "K+/Oo4ama1wditbhQTFYg9g6RoSR4GPDbrSszXh6giBqxGJWMgQdzbK7q6eB/6gdIcep/FRzx8DQGPw2OOFm3Q=="
publicKey: "asRiVjIEHc2yu6ungf+oHSHHqfxUc8fA0Bj8NjjhZt0="
- Configure the
uniqueKey
. You can find theuniqueKey
inParticipant Key
tab ofNetwork Participant
ofBeckn Protocol Registry
registryUrl: https://registry.becknprotocol.io/subscribers
auth: false
uniqueKey: "beckn-sandbox-bap-key.becknprotocol.io"
- Keep below configuration as it is.
# Mandatory.
city: "std:080"
country: "IND"
# Mandatory.
ttl: "PT10M"
# Mandatory.
httpTimeout: "PT3S"
httpRetryCount: 2
- Execute the command
npm run install
to npm packages. - Execute the command
npm run dev
to start the server. - Make the BPP Network server publicly accessible by using tools like localtunnel, ngrok, loophole. This public url will be used in
config/default.yml
andBeckn registry
.