Skip to main content

Send Your First Receipt

Send a test receipt to verify your integration is working correctly.

Before You Begin

Ensure you have completed:

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 ID
  • endUserEmiratesId - 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

FieldTypeDescription
referencestringYour unique receipt/transaction reference number
endUserBaridId OR endUserUaePassId OR endUserEmiratesIdstring/guidEnd user identifier (at least one required)
lineItems OR partsarrayAt least one must be provided (both can be included)

Optional Fields

FieldTypeDescription
transactionDateUtcdatetimeWhen the transaction occurred
subtotaldecimalAmount before tax
vatAmountdecimalTotal VAT/tax amount
totalAmountdecimalTotal including tax
currencystringCurrency code (default: "Aed")
paymentMethodstringe.g., "Cash", "Credit Card", "Apple Pay"
cardLastFourDigitsstringLast 4 digits if card payment
storeNamestringStore/location name
storeAddressstringStore/location address

Line Item Fields

FieldTypeRequiredDescription
descriptionstringYesItem description
quantitydecimalNoQuantity (default: 1)
unitstringNoUnit of measurement
unitPricedecimalNoPrice per unit
totalAmountdecimalNoLine total
vatPercentagedecimalNoVAT percentage (e.g., 5 for 5%)
vatAmountdecimalNoVAT amount for this item
categorystringNoItem category
productCodestringNoSKU or product code

Next Steps

Once you've successfully sent a test receipt:

  1. Review best practices
  2. Deep dive into API Integration Guide
  3. Set up production environment
  4. Configure monitoring and error handling

Support

Need help with your first receipt?