- Creating a new transaction (which generates a verification code)
- Validating the transaction with the verification code
Step 1: Create a Transaction
First, you’ll need to create a new transaction. This will generate a verification code that will be sent to the customer.Request Body
The request body should contain the following parameters:| Parameter | Type | Description |
|---|---|---|
cornerStoreId | String | The ID of the corner store where the transaction will be created. |
totalAmount | Number | The total amount of the transaction. |
wholesalerTransactionId | String | The ID of the transaction in the wholesaler’s system. |
deliveryDate | String | The expected delivery date of the transaction. |
metadata | Object | An object containing any additional metadata for the transaction. |
products | Array of Objects | An array of products in the transaction. Each product object should contain the following parameters: |
| Parameter | Type | Description |
externalSKU | String | The SKU of the product. |
name | String | The name of the product. |
quantity | Number | The quantity of the product. |
transactionId and verificationId as you’ll need them for the next step.
Create transaction use-case
Get more information about the create transaction use-case.
Step 2: Validate the Transaction
Once the customer receives the verification code, you’ll need to validate the transaction using both thetransactionId and verificationId from the previous step.
Validate transaction use-case
Get more information about the validate transaction use-case.
Error Handling
Both endpoints may return various error responses that you should handle in your implementation:Create Transaction Errors
- Corner store not found (404)
- Amount exceeded the limit credit available (422)
- User is in default (422)
- Transaction amount below the minimum required (422)
- User not verified (422)
- Invalid delivery date (422)
Validate Transaction Errors
- Transaction not found (404)
- Transaction is already verified (422)
- Verification not found (404)
- Verification not valid (422)

