Send Your First Receipt
Send a test receipt to verify your integration is working correctly.
Before You Begin
Ensure you have completed:
- Registration - Your organization is registered
- Authentication - Credentials are configured
Create a Receipt
Receipts are sent directly to end users without requiring approval. You must identify the end user using one of the following identifiers:
endUserBaridId- Barid user ID (GUID)endUserUaePassId- UAE Pass Subject IDendUserEmiratesId- Emirates ID number
At least one of these identifiers must be provided, and at least line items or document parts must be included. You can also provide both line items and document parts together.
API Integration
Create Receipt with Line Items:
curl -X POST https://qa.sender.api.barid.ae/api/v1/receipts \
-H "X-Session: YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"endUserEmiratesId": "784-1234-1234567-1",
"reference": "REC-2024-001234",
"transactionDateUtc": "2024-01-15T14:30:00Z",
"subtotal": 100.00,
"vatAmount": 5.00,
"totalAmount": 105.00,
"currency": "Aed",
"paymentMethod": "Credit Card",
"cardLastFourDigits": "4242",
"storeName": "Dubai Mall Store",
"storeAddress": "Dubai Mall, Ground Floor, Dubai, UAE",
"lineItems": [
{
"description": "Product A",
"quantity": 2,
"unit": "pcs",
"unitPrice": 40.00,
"totalAmount": 80.00,
"vatPercentage": 5,
"vatAmount": 4.00,
"category": "Electronics",
"productCode": "SKU-001"
},
{
"description": "Product B",
"quantity": 1,
"unit": "pcs",
"unitPrice": 20.00,
"totalAmount": 20.00,
"vatPercentage": 5,
"vatAmount": 1.00,
"category": "Accessories"
}
]
}'
Create Receipt with Document (PDF/Image):
Instead of line items, you can attach a scanned receipt or PDF:
curl -X POST https://qa.sender.api.barid.ae/api/v1/receipts \
-H "X-Session: YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"endUserEmiratesId": "784-1234-1234567-1",
"reference": "REC-2024-001235",
"transactionDateUtc": "2024-01-15T15:00:00Z",
"subtotal": 50.00,
"vatAmount": 2.50,
"totalAmount": 52.50,
"currency": "Aed",
"paymentMethod": "Cash",
"storeName": "Coffee Shop",
"parts": [{
"fileName": "receipt.pdf",
"mimeType": "application/pdf",
"base64Data": "BASE64_ENCODED_PDF"
}]
}'
Supported file types for document parts: pdf, jpg, jpeg, png, webp
Response:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"endUserId": "user-id",
"senderId": "sender-id",
"reference": "REC-2024-001234",
"transactionDateUtc": "2024-01-15T14:30:00Z",
"subtotal": 100.00,
"vatAmount": 5.00,
"totalAmount": 105.00,
"currency": "Aed",
"paymentMethod": "Credit Card",
"cardLastFourDigits": "4242",
"storeName": "Dubai Mall Store",
"storeAddress": "Dubai Mall, Ground Floor, Dubai, UAE",
"lineItems": [
{
"description": "Product A",
"quantity": 2,
"unit": "pcs",
"unitPrice": 40.00,
"totalAmount": 80.00,
"vatPercentage": 5,
"vatAmount": 4.00,
"category": "Electronics",
"productCode": "SKU-001"
}
],
"createdAtUtc": "2024-01-15T14:30:05Z",
"sender": {
"companyNameEn": "Your Company"
},
"documentUrls": [
{
"url": "https://cdn.barid.ae/...",
"expiresAt": "2024-01-15T15:30:05Z"
}
]
}
For detailed request and response schemas, see the API Reference.
Request Fields
Required Fields
| Field | Type | Description |
|---|---|---|
reference | string | Your unique receipt/transaction reference number |
endUserBaridId OR endUserUaePassId OR endUserEmiratesId | string/guid | End user identifier (at least one required) |
lineItems OR parts | array | At least one must be provided (both can be included) |
Optional Fields
| Field | Type | Description |
|---|---|---|
transactionDateUtc | datetime | When the transaction occurred |
subtotal | decimal | Amount before tax |
vatAmount | decimal | Total VAT/tax amount |
totalAmount | decimal | Total including tax |
currency | string | Currency code (default: "Aed") |
paymentMethod | string | e.g., "Cash", "Credit Card", "Apple Pay" |
cardLastFourDigits | string | Last 4 digits if card payment |
storeName | string | Store/location name |
storeAddress | string | Store/location address |
Line Item Fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Item description |
quantity | decimal | No | Quantity (default: 1) |
unit | string | No | Unit of measurement |
unitPrice | decimal | No | Price per unit |
totalAmount | decimal | No | Line total |
vatPercentage | decimal | No | VAT percentage (e.g., 5 for 5%) |
vatAmount | decimal | No | VAT amount for this item |
category | string | No | Item category |
productCode | string | No | SKU or product code |
Next Steps
Once you've successfully sent a test receipt:
- Review best practices
- Deep dive into API Integration Guide
- Set up production environment
- Configure monitoring and error handling
Support
Need help with your first receipt?
- Email: support@barid.ae
- API Reference: See navigation menu above