This endpoint will let the Distributor confirm the buy gold transaction post the Buy Verify API.
The Buy Confirm API will be called by the Distributor once the customer has successfully completed the payment for the particular transaction. On success, the value of gold for the particular transaction would be added to the customer’s gold wallet.
Once the Buy Verify API is called by the Distributor, the Buy Confirm API needs to be called within 10 minutes from the time the Buy Verify API was called. This means the payment needs to be completed by the customer for the particular buy transaction within 10 minutes of the transaction ID created through the Buy Verify API.
If the Distributor calls the Buy Confirm API post the time limit of 10 minutes from the time the Buy Verify API was called, the particular transaction would be Failed and the response in the Buy Confirm API would be rendered as Failed. (Status - 2 in Order Status API)
Note: Post the Distributor calls the Buy Verify API, Distributor can set a limit on Distributor’s side that the Buy Confirm API needs to be called within 8 minutes from the time the Buy Verify API was called. So if the customer fails to complete the payment within 8 minutes of the transaction ID created through the Buy Verify API, Distributor will not hit the Buy Confirm API for the particular transaction. If the customer completes the payment but the time limit extends beyond 8 minutes, the distributor will not hit the Buy Confirm API and refund the amount of the particular transaction to the customer.
Method Type | POST |
---|---|
Staging URL | https://partners-staging.safegold.com/v1/users/{user_id}/buy-gold-confirm |
Production URL | https://partners.safegold.com/v1/users/{user_id}/buy-gold-confirm |
URL Params
Parameters | Value |
---|---|
user_id | [integer] Example: user_id = 2 |
Request Parameters
Field | Description | Data Type | |
---|---|---|---|
tx_id | This would be the Transaction ID which was passed by SafeGold to the Distributor in the previous Buy Verify API for the particular User ID. | Integer | Autoincremental ID generated by SafeGold system |
pincode | Pincode of the User. Not compulsory if the Pincode has been provided during the registration of the User. | Numeric | 6 |
date | Timestamp that needs to be considered for Reconciliation. | Y-M-D H:I:S |
Success 200 Response Parameters
Field | Description |
---|---|
invoice_id | Invoice ID generated by SafeGold which would be seen in the Invoice for the particular transaction. |
Failure Parameters
Status Code | Code | Code Description |
---|---|---|
HTTP Status 400 | ||
1 | Missing required information | |
2 | Invalid transaction ID | |
3 | User ID/Vendor ID Mismatch | |
5 | user_id missing in transaction |
Once the Confirm API is successful, SafeGold will generate an Invoice. The Invoice will be accessible to the Distributor through an Invoice API. the Distributor will pass the transaction ID on the Invoice API and will receive a link to the Invoice in PDF Format.
Points to remember
- The tx_id from the pervious Buy Verfiy API must be passed to the tx_id of this API for confirming the transaction that was initiated when the Buy Verfiy API was executed.
- The tx_id is an important value for Buy Flow and must remain the same. Incase of any issue run the Buy Verify API again to initiate a new transaction.