Plum Pro API FAQs

How do we Validate the auth token and automate its life-cycle?

To maintain a valid auth token, automate its life-cycle. This information will help you to do that.

1. Token received after STEP 3 is valid for 15 days, during this period you can do Additional STEP 1: Access Token generation from Refresh Token. It will give you a new valid token for the next 15 days.

2. To check how much time your token has before it dies, Use Additional STEP 2: Access Token Validation.

3.If you miss refreshing your token within 15 days and it expires, you can still do Additional STEP 1: Access Token generation from Refresh Token in next 15 days.

The only time you need to do STEP 2 - Authorization Request + STEP 3 - Token Exchange again is when you failed to regenerate access token and lose your refresh token.

We would suggest for this super rare situation, you can automate the process by creating a single page app. Which takes care of STEP 2 - Authorization Request + STEP 3 - Token Exchange and stores the access token and refresh token somewhere, where it can be used for APIs. This is not required but recommended.

What is Redirect_uri and why it is needed?

The redirect_uri is an address used by OAuth providers as a location to deliver the access_token by means of a browser redirect.

We need the redirect_uri to to make sure that we are redirecting back to a legit url. {Reference}

Do you store a prepaid digital stock of NON - API Vendors?

Yes, we do store a prepaid digital stock of NON - API Vendors, based on basic customer projections and our past experience. In case some of these are exhausted it takes 3/4 working days to refill. If it's a popular brand we store it from 50-100 prepaid stocks and if it's an average brand we store around 5-10 prepaid stocks.

Do you have an API that enables us to check your real-time prepaid stock?

No, We don’t have such an API.

What happens if you run out of prepaid stock and how is this handled? and How long does it take to resupply?

Please go through the below use cases defined:

Case 1 - When a request is sent and Xoxoday fulfills the request immediately, In this case the response we give is "Success=1, Link + Code/pin for the request"
Case 2 - When a request is sent and if Xoxoday could not fulfill the request immediately, we put the order into Pending, In this case the response we give is "Success=1, Link in the request" (there will be no Code/pin)
Case 3 - When a request is sent and if Xoxoday did not fulfil/not able to fulfil the order,In this case the response we give is "Success = 0" (there will no Link or Code/pin in response)
We run a cron for every half an hour to check the supply, at a max level it can take up to 7 days.

Does your new API have a unique error message for out of stock orders?

Yes - PLE10024: Vouchers are out of stock

Can we use the same PO Number again?

For the cancelled order, you can send the same the poNumber again. But once an order is successful, the same poNumber will generate an error.

What are the different values expected in orderStatus and type?

If you receive a response, orderStatus will always be "completed" while the deliveryStatus could be either of "Canceled", "Pending" or "Delivered".

How do we handle the use case of a missed response?

You can always send the poNumber through the getOrderDetails API which should get you the same order's response in the exact same format as the placeOrder API.

What are the distinct voucher types?

The distinct voucher types will be: code, codePin and url.

Sample code and pin values for different voucher types:

type: "code" => code: "CODE-123", pin: ""
type: "codePin" => code: "CODE-123", pin: "PIN-123"
type: "url" => code: "url", pin: "" (Here, the pin could either exist or be blank. Usually the URL is sufficient for redemption purposes. But, we would suggest you store the pin as well.)

How is the redirect_uri handled in staging and production?

In staging, the redirect_uri is relaxed which means you can use any uri in the url as well as the API as long as they are the same (url encoded in the url). In production, there will be 1 specific uri which will work for the redirection part since the redirect_uri there will not be relaxed.

How do I recharge my account on staging?

You will have to do the recharge yourself as we have the facility for clients to recharge their accounts themselves.

Please follow the following steps:

1. Go to stagingstores.xoxoday.com
2. Login with the admin email and password that you use to log in for the OAuth part.
3. You will be redirected to stagingstores.xoxoday.com/admin.
4. On the left side, there will be a Recharge option. Click on it.
5. You should see a card with the title "Plum Pro Funds" and a button which says "Add funds". Click on "Add Funds".
6. Enter the amount and click on "Proceed to Payment"
7. Enter your phone number.
8. Choose to pay by card and use the following details:
Card Number: 5123456789012346
Name: test
CVV: 123
expiry: 05/2021.
9. You will be redirected to a page with the title AXIS SIMULATOR asking for an OTP. Please enter the OTP as 123456 and hit the submit button.
This should add the entered amount to your balance and you will be ready to place orders.

Will there be any notification if any gift cards are removed or are unavailable?

You can use voucherList API to check the latest status of a voucher. We don't send any notification.

Will the API support multi admin?

API support multi admin feature is currently unavailable and in the works. We expect to go live with it in early September.

Did this answer your question?
...