I want to make a interface so that user can register and login themselves at citrus using PHP technology and use that wallet in their payment. Does citrus provide any API for this?
I want to make a interface so that user can register and login themselves at citrus using PHP technology and use that wallet in their payment. Does citrus provide any API for this?
Yes, Citrus-Pay does provide APIs for Integrating with Wallet where you can define your own interface.
Alternatively, you may also use the standard UI provided by Citrus. If you want to go forward with APIs,
1) Get a signup token using the API mentioned in this link: https://developers.citruspay.com/documentation/wallettab/identity-profile/oauth-token-api/
2) Call Find Or Create User API as next step. This API will trigger an OTP to the customer's mobile number passed in the request.(A Citrus Wallet is uniquely identified by a mobile number)
API on dev guide: https://developers.citruspay.com/documentation/wallettab/identity-profile/find-or-create-a-wallet/
3) Now this OTP has to be entered in an appropriate API.Which API to be used is told in the response of find or create wallet API called in step 2. (Password-based login is also supported).
It could be sign in with MOTP API ( for an existing citrus wallet customer) or verify mobile and sign API ( for new wallet accounts just being created)enter link description here
4)You will get a full access token (prepaid_pay) in response.Pass this in header of all other APIs which you need to call on behalf of user.
5)For Eg: To make a payment using the customers existing wallet balance , use the following API : https://developers.citruspay.com/documentation/wallettab/pay-using-citrus-wallet/make-payment/
Hope this helps