Order
1. Place Order
- Endpoint:
/v1/partners/orders - Description: API to generate voucher.
- If vouchers are successfully generated, the status will be
SUCCESSand the vouchers list will contain voucher data. - If status is
PROCESSINGthe voucher generation is taking time and the status can be polled by the client / hubble can intimate the client using the Order reached terminal state - Webhook. - In case of status
PROCESSINGvoucher list will be empty. - Partners manage voucher distribution to end customers, by default. Alternatively, Hubble can also handle voucher delivery. For this, partners need to send
recipientDetailsin the place order API. For this service option, please reach out to our business team.
- If vouchers are successfully generated, the status will be
- Method: POST
Request Body
{ "productId": "brand_id", "referenceId": "idempotency key from source system", "amount": 1000, "denominationDetails": [ { "denomination": 500, "quantity": 2 } ], "customerDetails": { "name": "Hubble User", "phoneNumber": "9999999999", "email": "example@gmail.com", }, "recipientDetails": { "name": "Recipient User", "phoneNumber": "9999999999" }}Response body
{ "id": "order_id", "referenceId" : "idempotency key from source system", "status": "SUCCESS/FAILED/PROCESSING/REVERSED", "vouchers": [ { "id": "voucher_id", "cardType" : "PIN_SECURED/CARD_NO_AND_PIN", "cardPin": "112233", "cardNumber": "2359481287412", "validTill": "2022-11-22", "amount": "500" }, { "id": "voucher_id", "cardType" : "PIN_SECURED/CARD_NO_AND_PIN", "cardPin": "112233", "cardNumber": "2359481287412", "validTill": "2022-11-22", "amount": "500" } ]}2. Get Order Details
- Endpoint:
/v1/partners/orders/:orderIdOR/ /v1/partners/orders/by-reference/:referenceId - Description: Get the order details based on order ID or reference ID
- Method: GET
Response Body
{ "id": "order_id", "referenceId" : "idempotency key from source system", "status": "SUCCESS/FAILED/PROCESSING/REVERSED", "vouchers": [ { "id": "voucher_id", "cardType" : "PIN_SECURED/CARD_NO_AND_PIN", "cardPin": "112233", "cardNumber": "2359481287412", "validTill": "2022-11-22", "amount": "100" }, { "id": "voucher_id", "cardType" : "PIN_SECURED/CARD_NO_AND_PIN", "cardPin": "112233", "cardNumber": "2359481287412", "validTill": "2022-11-22", "amount": "100" } ]}3. Get Voucher Details
- Endpoint:
/v1/partners/orders/vouchers/:id - Description: Get details of individual voucher.
- Method: GET
Response Body
{ "id": "voucher_id", "cardType": "PIN_SECURED/CARD_NO_AND_PIN", "cardPin": "112233", "cardNumber": "2359481287412", "validTill": "2022-11-22", "generatedDate": "2022-11-22", "amount": "100", "balance": "100"}