cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/{businessId}/receipts \
--header 'Content-Type: application/json' \
--data '
{
"attachmentId": 123,
"businessId": 123,
"merchantId": 123,
"customerId": 123,
"vendorId": 123,
"vendorAccountId": 123,
"categoryId": 123,
"currency": "<string>",
"description": "<string>",
"category": "<string>",
"note": "<string>",
"date": "2023-11-07T05:31:56Z",
"taxesIncluded": true,
"tags": [
"<string>"
],
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
],
"lineItemGroups": [
{
"name": "<string>",
"description": "<string>",
"displayOrder": 123,
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
]
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": true
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPaid": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"locationId": 123,
"location": {
"name": "<string>",
"description": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"businessCategoryCode": "<string>",
"currency": "<string>",
"timezone": "<string>",
"phoneNumber": "<string>",
"website": "<string>",
"facebookUrl": "<string>",
"instagramUsername": "<string>",
"twitterUsername": "<string>",
"isActive": true,
"locale": "<string>",
"email": "<string>",
"logo": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
]
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"companyName": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"isTaxExempt": true,
"tags": [
"<string>"
],
"currency": "<string>",
"acceptsMarketing": true,
"phoneNumber": "<string>",
"nickname": "<string>",
"note": "<string>",
"locale": "<string>",
"accountNumber": "<string>",
"customerNumber": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"metadata": {}
},
"receiptId": "<string>",
"employeeId": 123,
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"orderNumber": "<string>",
"paymentStatus": "<string>",
"totalWeight": 123,
"source": "<string>",
"receiptMetadata": {
"landingSite": "<string>",
"customerLocale": "<string>",
"refferingSite": "<string>",
"sourcePOS": "<string>",
"sourceName": "<string>",
"tags": "<string>",
"url": "<string>",
"browserMetadata": {
"acceptLanguage": "<string>",
"browserHeight": 123,
"browserIp": "<string>",
"browserWidth": 123,
"sessionHash": "<string>",
"userAgent": "<string>"
}
},
"payments": [
{
"receiptId": 123,
"statementDescriptor": "<string>",
"card": {
"authorizationCode": "<string>",
"statementDescriptor": "<string>",
"paymentMethod": {
"cardholderName": "<string>",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"country": "<string>",
"brand": "<string>",
"displayBrand": "<string>",
"coBrand": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"last4": "<string>",
"dynamicLast4": "<string>",
"bin": "<string>",
"fingerprint": {
"fingerprint": "<string>"
}
},
"emv": {
"applicationId": "<string>",
"applicationName": "<string>",
"applicationCryptogram": "<string>",
"cardholderVerificationMethod": "<string>",
"cardholderVerificationResult": "<string>"
},
"timeline": {
"authorizedAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"voidedAt": "2023-11-07T05:31:56Z"
}
},
"cash": {
"supplied": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"change": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
}
},
"bankAccount": {
"bankName": "<string>",
"last4": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>",
"accountType": "<string>",
"fingerprint": "<string>",
"statementDescriptor": "<string>",
"countryCode": "<string>"
},
"external": {
"source": "<string>",
"sourceId": "<string>",
"fee": {
"id": 123,
"currency": "<string>",
"amount": 123,
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"tip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"applicationFee": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"approuved": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"refunded": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"receiptNumber": "<string>",
"receiptUrl": "<string>",
"note": "<string>",
"riskEvaluation": {
"riskScore": 123
},
"refunds": [
{}
]
}
],
"barcode": {
"value": "<string>"
},
"originalReceiptUrl": "<string>",
"paymentLinkUrl": "<string>",
"review": {
"rating": 123,
"review": "<string>",
"localizedReview": {}
},
"signature": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
}
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/receipts"
payload = {
"attachmentId": 123,
"businessId": 123,
"merchantId": 123,
"customerId": 123,
"vendorId": 123,
"vendorAccountId": 123,
"categoryId": 123,
"currency": "<string>",
"description": "<string>",
"category": "<string>",
"note": "<string>",
"date": "2023-11-07T05:31:56Z",
"taxesIncluded": True,
"tags": ["<string>"],
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
],
"lineItemGroups": [
{
"name": "<string>",
"description": "<string>",
"displayOrder": 123,
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
]
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": True
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPaid": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"locationId": 123,
"location": {
"name": "<string>",
"description": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"businessCategoryCode": "<string>",
"currency": "<string>",
"timezone": "<string>",
"phoneNumber": "<string>",
"website": "<string>",
"facebookUrl": "<string>",
"instagramUsername": "<string>",
"twitterUsername": "<string>",
"isActive": True,
"locale": "<string>",
"email": "<string>",
"logo": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
]
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"companyName": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"isTaxExempt": True,
"tags": ["<string>"],
"currency": "<string>",
"acceptsMarketing": True,
"phoneNumber": "<string>",
"nickname": "<string>",
"note": "<string>",
"locale": "<string>",
"accountNumber": "<string>",
"customerNumber": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"metadata": {}
},
"receiptId": "<string>",
"employeeId": 123,
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"orderNumber": "<string>",
"paymentStatus": "<string>",
"totalWeight": 123,
"source": "<string>",
"receiptMetadata": {
"landingSite": "<string>",
"customerLocale": "<string>",
"refferingSite": "<string>",
"sourcePOS": "<string>",
"sourceName": "<string>",
"tags": "<string>",
"url": "<string>",
"browserMetadata": {
"acceptLanguage": "<string>",
"browserHeight": 123,
"browserIp": "<string>",
"browserWidth": 123,
"sessionHash": "<string>",
"userAgent": "<string>"
}
},
"payments": [
{
"receiptId": 123,
"statementDescriptor": "<string>",
"card": {
"authorizationCode": "<string>",
"statementDescriptor": "<string>",
"paymentMethod": {
"cardholderName": "<string>",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"country": "<string>",
"brand": "<string>",
"displayBrand": "<string>",
"coBrand": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"last4": "<string>",
"dynamicLast4": "<string>",
"bin": "<string>",
"fingerprint": { "fingerprint": "<string>" }
},
"emv": {
"applicationId": "<string>",
"applicationName": "<string>",
"applicationCryptogram": "<string>",
"cardholderVerificationMethod": "<string>",
"cardholderVerificationResult": "<string>"
},
"timeline": {
"authorizedAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"voidedAt": "2023-11-07T05:31:56Z"
}
},
"cash": {
"supplied": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"change": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
}
},
"bankAccount": {
"bankName": "<string>",
"last4": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>",
"accountType": "<string>",
"fingerprint": "<string>",
"statementDescriptor": "<string>",
"countryCode": "<string>"
},
"external": {
"source": "<string>",
"sourceId": "<string>",
"fee": {
"id": 123,
"currency": "<string>",
"amount": 123,
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"tip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"applicationFee": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"approuved": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"refunded": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"receiptNumber": "<string>",
"receiptUrl": "<string>",
"note": "<string>",
"riskEvaluation": { "riskScore": 123 },
"refunds": [{}]
}
],
"barcode": { "value": "<string>" },
"originalReceiptUrl": "<string>",
"paymentLinkUrl": "<string>",
"review": {
"rating": 123,
"review": "<string>",
"localizedReview": {}
},
"signature": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
attachmentId: 123,
businessId: 123,
merchantId: 123,
customerId: 123,
vendorId: 123,
vendorAccountId: 123,
categoryId: 123,
currency: '<string>',
description: '<string>',
category: '<string>',
note: '<string>',
date: '2023-11-07T05:31:56Z',
taxesIncluded: true,
tags: ['<string>'],
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
],
lineItemGroups: [
{
name: '<string>',
description: '<string>',
displayOrder: 123,
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
]
}
],
taxes: [
{
name: '<string>',
rate: 123,
totalAmount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxIdentificationNumber: '<string>',
taxIncluded: true
}
],
discounts: [
{
promoCodeId: 123,
expenseId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
percentage: 123
}
],
fees: [
{
feeId: 123,
name: '<string>',
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
type: '<string>'
}
],
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalFees: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalShipping: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPaid: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
locationId: 123,
location: {
name: '<string>',
description: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
businessCategoryCode: '<string>',
currency: '<string>',
timezone: '<string>',
phoneNumber: '<string>',
website: '<string>',
facebookUrl: '<string>',
instagramUsername: '<string>',
twitterUsername: '<string>',
isActive: true,
locale: '<string>',
email: '<string>',
logo: '<string>',
images: [
{
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
}
]
},
customer: {
firstName: '<string>',
lastName: '<string>',
email: '<string>',
companyName: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
stateCode: '<string>',
country: '<string>',
countryCode: '<string>',
postalCode: '<string>',
location: {longitude: 123, latitude: 123},
googlePlaceId: '<string>',
formattedAddress: '<string>'
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
isTaxExempt: true,
tags: ['<string>'],
currency: '<string>',
acceptsMarketing: true,
phoneNumber: '<string>',
nickname: '<string>',
note: '<string>',
locale: '<string>',
accountNumber: '<string>',
customerNumber: '<string>',
birthDate: '2023-11-07T05:31:56Z',
metadata: {}
},
receiptId: '<string>',
employeeId: 123,
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
cancelledAt: '2023-11-07T05:31:56Z',
cancelReason: '<string>',
orderNumber: '<string>',
paymentStatus: '<string>',
totalWeight: 123,
source: '<string>',
receiptMetadata: {
landingSite: '<string>',
customerLocale: '<string>',
refferingSite: '<string>',
sourcePOS: '<string>',
sourceName: '<string>',
tags: '<string>',
url: '<string>',
browserMetadata: {
acceptLanguage: '<string>',
browserHeight: 123,
browserIp: '<string>',
browserWidth: 123,
sessionHash: '<string>',
userAgent: '<string>'
}
},
payments: [
{
receiptId: 123,
statementDescriptor: '<string>',
card: {
authorizationCode: '<string>',
statementDescriptor: '<string>',
paymentMethod: {
cardholderName: '<string>',
cardholderFirstName: '<string>',
cardholderLastName: '<string>',
country: '<string>',
brand: '<string>',
displayBrand: '<string>',
coBrand: '<string>',
expirationMonth: 123,
expirationYear: 123,
last4: '<string>',
dynamicLast4: '<string>',
bin: '<string>',
fingerprint: {fingerprint: '<string>'}
},
emv: {
applicationId: '<string>',
applicationName: '<string>',
applicationCryptogram: '<string>',
cardholderVerificationMethod: '<string>',
cardholderVerificationResult: '<string>'
},
timeline: {
authorizedAt: '2023-11-07T05:31:56Z',
capturedAt: '2023-11-07T05:31:56Z',
voidedAt: '2023-11-07T05:31:56Z'
}
},
cash: {
supplied: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
change: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
}
},
bankAccount: {
bankName: '<string>',
last4: '<string>',
accountNumber: '<string>',
routingNumber: '<string>',
accountType: '<string>',
fingerprint: '<string>',
statementDescriptor: '<string>',
countryCode: '<string>'
},
external: {
source: '<string>',
sourceId: '<string>',
fee: {
id: 123,
currency: '<string>',
amount: 123,
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
tip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
applicationFee: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
approuved: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
refunded: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
receiptNumber: '<string>',
receiptUrl: '<string>',
note: '<string>',
riskEvaluation: {riskScore: 123},
refunds: [{}]
}
],
barcode: {value: '<string>'},
originalReceiptUrl: '<string>',
paymentLinkUrl: '<string>',
review: {rating: 123, review: '<string>', localizedReview: {}},
signature: {
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
}
})
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/v1/businesses/{businessId}/receipts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'attachmentId' => 123,
'businessId' => 123,
'merchantId' => 123,
'customerId' => 123,
'vendorId' => 123,
'vendorAccountId' => 123,
'categoryId' => 123,
'currency' => '<string>',
'description' => '<string>',
'category' => '<string>',
'note' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'taxesIncluded' => true,
'tags' => [
'<string>'
],
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
],
'lineItemGroups' => [
[
'name' => '<string>',
'description' => '<string>',
'displayOrder' => 123,
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
]
]
],
'taxes' => [
[
'name' => '<string>',
'rate' => 123,
'totalAmount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxIdentificationNumber' => '<string>',
'taxIncluded' => true
]
],
'discounts' => [
[
'promoCodeId' => 123,
'expenseId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'percentage' => 123
]
],
'fees' => [
[
'feeId' => 123,
'name' => '<string>',
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'type' => '<string>'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalFees' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalShipping' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPaid' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'locationId' => 123,
'location' => [
'name' => '<string>',
'description' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'businessCategoryCode' => '<string>',
'currency' => '<string>',
'timezone' => '<string>',
'phoneNumber' => '<string>',
'website' => '<string>',
'facebookUrl' => '<string>',
'instagramUsername' => '<string>',
'twitterUsername' => '<string>',
'isActive' => true,
'locale' => '<string>',
'email' => '<string>',
'logo' => '<string>',
'images' => [
[
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
]
]
],
'customer' => [
'firstName' => '<string>',
'lastName' => '<string>',
'email' => '<string>',
'companyName' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateCode' => '<string>',
'country' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>',
'location' => [
'longitude' => 123,
'latitude' => 123
],
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>'
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'isTaxExempt' => true,
'tags' => [
'<string>'
],
'currency' => '<string>',
'acceptsMarketing' => true,
'phoneNumber' => '<string>',
'nickname' => '<string>',
'note' => '<string>',
'locale' => '<string>',
'accountNumber' => '<string>',
'customerNumber' => '<string>',
'birthDate' => '2023-11-07T05:31:56Z',
'metadata' => [
]
],
'receiptId' => '<string>',
'employeeId' => 123,
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'cancelledAt' => '2023-11-07T05:31:56Z',
'cancelReason' => '<string>',
'orderNumber' => '<string>',
'paymentStatus' => '<string>',
'totalWeight' => 123,
'source' => '<string>',
'receiptMetadata' => [
'landingSite' => '<string>',
'customerLocale' => '<string>',
'refferingSite' => '<string>',
'sourcePOS' => '<string>',
'sourceName' => '<string>',
'tags' => '<string>',
'url' => '<string>',
'browserMetadata' => [
'acceptLanguage' => '<string>',
'browserHeight' => 123,
'browserIp' => '<string>',
'browserWidth' => 123,
'sessionHash' => '<string>',
'userAgent' => '<string>'
]
],
'payments' => [
[
'receiptId' => 123,
'statementDescriptor' => '<string>',
'card' => [
'authorizationCode' => '<string>',
'statementDescriptor' => '<string>',
'paymentMethod' => [
'cardholderName' => '<string>',
'cardholderFirstName' => '<string>',
'cardholderLastName' => '<string>',
'country' => '<string>',
'brand' => '<string>',
'displayBrand' => '<string>',
'coBrand' => '<string>',
'expirationMonth' => 123,
'expirationYear' => 123,
'last4' => '<string>',
'dynamicLast4' => '<string>',
'bin' => '<string>',
'fingerprint' => [
'fingerprint' => '<string>'
]
],
'emv' => [
'applicationId' => '<string>',
'applicationName' => '<string>',
'applicationCryptogram' => '<string>',
'cardholderVerificationMethod' => '<string>',
'cardholderVerificationResult' => '<string>'
],
'timeline' => [
'authorizedAt' => '2023-11-07T05:31:56Z',
'capturedAt' => '2023-11-07T05:31:56Z',
'voidedAt' => '2023-11-07T05:31:56Z'
]
],
'cash' => [
'supplied' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'change' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
]
],
'bankAccount' => [
'bankName' => '<string>',
'last4' => '<string>',
'accountNumber' => '<string>',
'routingNumber' => '<string>',
'accountType' => '<string>',
'fingerprint' => '<string>',
'statementDescriptor' => '<string>',
'countryCode' => '<string>'
],
'external' => [
'source' => '<string>',
'sourceId' => '<string>',
'fee' => [
'id' => 123,
'currency' => '<string>',
'amount' => 123,
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'tip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'applicationFee' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'approuved' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'refunded' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'receiptNumber' => '<string>',
'receiptUrl' => '<string>',
'note' => '<string>',
'riskEvaluation' => [
'riskScore' => 123
],
'refunds' => [
[
]
]
]
],
'barcode' => [
'value' => '<string>'
],
'originalReceiptUrl' => '<string>',
'paymentLinkUrl' => '<string>',
'review' => [
'rating' => 123,
'review' => '<string>',
'localizedReview' => [
]
],
'signature' => [
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/v1/businesses/{businessId}/receipts"
payload := strings.NewReader("{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/v1/businesses/{businessId}/receipts")
.header("Content-Type", "application/json")
.body("{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/receipts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyBusinessReceipts
Post v1businesses receipts
POST
/
v1
/
businesses
/
{businessId}
/
receipts
cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/{businessId}/receipts \
--header 'Content-Type: application/json' \
--data '
{
"attachmentId": 123,
"businessId": 123,
"merchantId": 123,
"customerId": 123,
"vendorId": 123,
"vendorAccountId": 123,
"categoryId": 123,
"currency": "<string>",
"description": "<string>",
"category": "<string>",
"note": "<string>",
"date": "2023-11-07T05:31:56Z",
"taxesIncluded": true,
"tags": [
"<string>"
],
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
],
"lineItemGroups": [
{
"name": "<string>",
"description": "<string>",
"displayOrder": 123,
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
]
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": true
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPaid": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"locationId": 123,
"location": {
"name": "<string>",
"description": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"businessCategoryCode": "<string>",
"currency": "<string>",
"timezone": "<string>",
"phoneNumber": "<string>",
"website": "<string>",
"facebookUrl": "<string>",
"instagramUsername": "<string>",
"twitterUsername": "<string>",
"isActive": true,
"locale": "<string>",
"email": "<string>",
"logo": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
]
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"companyName": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"isTaxExempt": true,
"tags": [
"<string>"
],
"currency": "<string>",
"acceptsMarketing": true,
"phoneNumber": "<string>",
"nickname": "<string>",
"note": "<string>",
"locale": "<string>",
"accountNumber": "<string>",
"customerNumber": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"metadata": {}
},
"receiptId": "<string>",
"employeeId": 123,
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"orderNumber": "<string>",
"paymentStatus": "<string>",
"totalWeight": 123,
"source": "<string>",
"receiptMetadata": {
"landingSite": "<string>",
"customerLocale": "<string>",
"refferingSite": "<string>",
"sourcePOS": "<string>",
"sourceName": "<string>",
"tags": "<string>",
"url": "<string>",
"browserMetadata": {
"acceptLanguage": "<string>",
"browserHeight": 123,
"browserIp": "<string>",
"browserWidth": 123,
"sessionHash": "<string>",
"userAgent": "<string>"
}
},
"payments": [
{
"receiptId": 123,
"statementDescriptor": "<string>",
"card": {
"authorizationCode": "<string>",
"statementDescriptor": "<string>",
"paymentMethod": {
"cardholderName": "<string>",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"country": "<string>",
"brand": "<string>",
"displayBrand": "<string>",
"coBrand": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"last4": "<string>",
"dynamicLast4": "<string>",
"bin": "<string>",
"fingerprint": {
"fingerprint": "<string>"
}
},
"emv": {
"applicationId": "<string>",
"applicationName": "<string>",
"applicationCryptogram": "<string>",
"cardholderVerificationMethod": "<string>",
"cardholderVerificationResult": "<string>"
},
"timeline": {
"authorizedAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"voidedAt": "2023-11-07T05:31:56Z"
}
},
"cash": {
"supplied": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"change": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
}
},
"bankAccount": {
"bankName": "<string>",
"last4": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>",
"accountType": "<string>",
"fingerprint": "<string>",
"statementDescriptor": "<string>",
"countryCode": "<string>"
},
"external": {
"source": "<string>",
"sourceId": "<string>",
"fee": {
"id": 123,
"currency": "<string>",
"amount": 123,
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"tip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"applicationFee": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"approuved": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"refunded": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"receiptNumber": "<string>",
"receiptUrl": "<string>",
"note": "<string>",
"riskEvaluation": {
"riskScore": 123
},
"refunds": [
{}
]
}
],
"barcode": {
"value": "<string>"
},
"originalReceiptUrl": "<string>",
"paymentLinkUrl": "<string>",
"review": {
"rating": 123,
"review": "<string>",
"localizedReview": {}
},
"signature": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
}
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/receipts"
payload = {
"attachmentId": 123,
"businessId": 123,
"merchantId": 123,
"customerId": 123,
"vendorId": 123,
"vendorAccountId": 123,
"categoryId": 123,
"currency": "<string>",
"description": "<string>",
"category": "<string>",
"note": "<string>",
"date": "2023-11-07T05:31:56Z",
"taxesIncluded": True,
"tags": ["<string>"],
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
],
"lineItemGroups": [
{
"name": "<string>",
"description": "<string>",
"displayOrder": 123,
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
]
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": True
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPaid": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"locationId": 123,
"location": {
"name": "<string>",
"description": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"businessCategoryCode": "<string>",
"currency": "<string>",
"timezone": "<string>",
"phoneNumber": "<string>",
"website": "<string>",
"facebookUrl": "<string>",
"instagramUsername": "<string>",
"twitterUsername": "<string>",
"isActive": True,
"locale": "<string>",
"email": "<string>",
"logo": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
]
},
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"companyName": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"isTaxExempt": True,
"tags": ["<string>"],
"currency": "<string>",
"acceptsMarketing": True,
"phoneNumber": "<string>",
"nickname": "<string>",
"note": "<string>",
"locale": "<string>",
"accountNumber": "<string>",
"customerNumber": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"metadata": {}
},
"receiptId": "<string>",
"employeeId": 123,
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelReason": "<string>",
"orderNumber": "<string>",
"paymentStatus": "<string>",
"totalWeight": 123,
"source": "<string>",
"receiptMetadata": {
"landingSite": "<string>",
"customerLocale": "<string>",
"refferingSite": "<string>",
"sourcePOS": "<string>",
"sourceName": "<string>",
"tags": "<string>",
"url": "<string>",
"browserMetadata": {
"acceptLanguage": "<string>",
"browserHeight": 123,
"browserIp": "<string>",
"browserWidth": 123,
"sessionHash": "<string>",
"userAgent": "<string>"
}
},
"payments": [
{
"receiptId": 123,
"statementDescriptor": "<string>",
"card": {
"authorizationCode": "<string>",
"statementDescriptor": "<string>",
"paymentMethod": {
"cardholderName": "<string>",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"country": "<string>",
"brand": "<string>",
"displayBrand": "<string>",
"coBrand": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"last4": "<string>",
"dynamicLast4": "<string>",
"bin": "<string>",
"fingerprint": { "fingerprint": "<string>" }
},
"emv": {
"applicationId": "<string>",
"applicationName": "<string>",
"applicationCryptogram": "<string>",
"cardholderVerificationMethod": "<string>",
"cardholderVerificationResult": "<string>"
},
"timeline": {
"authorizedAt": "2023-11-07T05:31:56Z",
"capturedAt": "2023-11-07T05:31:56Z",
"voidedAt": "2023-11-07T05:31:56Z"
}
},
"cash": {
"supplied": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"change": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
}
},
"bankAccount": {
"bankName": "<string>",
"last4": "<string>",
"accountNumber": "<string>",
"routingNumber": "<string>",
"accountType": "<string>",
"fingerprint": "<string>",
"statementDescriptor": "<string>",
"countryCode": "<string>"
},
"external": {
"source": "<string>",
"sourceId": "<string>",
"fee": {
"id": 123,
"currency": "<string>",
"amount": 123,
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"tip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"applicationFee": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"approuved": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"refunded": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"receiptNumber": "<string>",
"receiptUrl": "<string>",
"note": "<string>",
"riskEvaluation": { "riskScore": 123 },
"refunds": [{}]
}
],
"barcode": { "value": "<string>" },
"originalReceiptUrl": "<string>",
"paymentLinkUrl": "<string>",
"review": {
"rating": 123,
"review": "<string>",
"localizedReview": {}
},
"signature": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
attachmentId: 123,
businessId: 123,
merchantId: 123,
customerId: 123,
vendorId: 123,
vendorAccountId: 123,
categoryId: 123,
currency: '<string>',
description: '<string>',
category: '<string>',
note: '<string>',
date: '2023-11-07T05:31:56Z',
taxesIncluded: true,
tags: ['<string>'],
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
],
lineItemGroups: [
{
name: '<string>',
description: '<string>',
displayOrder: 123,
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
]
}
],
taxes: [
{
name: '<string>',
rate: 123,
totalAmount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxIdentificationNumber: '<string>',
taxIncluded: true
}
],
discounts: [
{
promoCodeId: 123,
expenseId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
percentage: 123
}
],
fees: [
{
feeId: 123,
name: '<string>',
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
type: '<string>'
}
],
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalFees: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalShipping: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPaid: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
locationId: 123,
location: {
name: '<string>',
description: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
businessCategoryCode: '<string>',
currency: '<string>',
timezone: '<string>',
phoneNumber: '<string>',
website: '<string>',
facebookUrl: '<string>',
instagramUsername: '<string>',
twitterUsername: '<string>',
isActive: true,
locale: '<string>',
email: '<string>',
logo: '<string>',
images: [
{
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
}
]
},
customer: {
firstName: '<string>',
lastName: '<string>',
email: '<string>',
companyName: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
stateCode: '<string>',
country: '<string>',
countryCode: '<string>',
postalCode: '<string>',
location: {longitude: 123, latitude: 123},
googlePlaceId: '<string>',
formattedAddress: '<string>'
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
isTaxExempt: true,
tags: ['<string>'],
currency: '<string>',
acceptsMarketing: true,
phoneNumber: '<string>',
nickname: '<string>',
note: '<string>',
locale: '<string>',
accountNumber: '<string>',
customerNumber: '<string>',
birthDate: '2023-11-07T05:31:56Z',
metadata: {}
},
receiptId: '<string>',
employeeId: 123,
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
cancelledAt: '2023-11-07T05:31:56Z',
cancelReason: '<string>',
orderNumber: '<string>',
paymentStatus: '<string>',
totalWeight: 123,
source: '<string>',
receiptMetadata: {
landingSite: '<string>',
customerLocale: '<string>',
refferingSite: '<string>',
sourcePOS: '<string>',
sourceName: '<string>',
tags: '<string>',
url: '<string>',
browserMetadata: {
acceptLanguage: '<string>',
browserHeight: 123,
browserIp: '<string>',
browserWidth: 123,
sessionHash: '<string>',
userAgent: '<string>'
}
},
payments: [
{
receiptId: 123,
statementDescriptor: '<string>',
card: {
authorizationCode: '<string>',
statementDescriptor: '<string>',
paymentMethod: {
cardholderName: '<string>',
cardholderFirstName: '<string>',
cardholderLastName: '<string>',
country: '<string>',
brand: '<string>',
displayBrand: '<string>',
coBrand: '<string>',
expirationMonth: 123,
expirationYear: 123,
last4: '<string>',
dynamicLast4: '<string>',
bin: '<string>',
fingerprint: {fingerprint: '<string>'}
},
emv: {
applicationId: '<string>',
applicationName: '<string>',
applicationCryptogram: '<string>',
cardholderVerificationMethod: '<string>',
cardholderVerificationResult: '<string>'
},
timeline: {
authorizedAt: '2023-11-07T05:31:56Z',
capturedAt: '2023-11-07T05:31:56Z',
voidedAt: '2023-11-07T05:31:56Z'
}
},
cash: {
supplied: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
change: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
}
},
bankAccount: {
bankName: '<string>',
last4: '<string>',
accountNumber: '<string>',
routingNumber: '<string>',
accountType: '<string>',
fingerprint: '<string>',
statementDescriptor: '<string>',
countryCode: '<string>'
},
external: {
source: '<string>',
sourceId: '<string>',
fee: {
id: 123,
currency: '<string>',
amount: 123,
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
tip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
applicationFee: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
approuved: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
refunded: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
receiptNumber: '<string>',
receiptUrl: '<string>',
note: '<string>',
riskEvaluation: {riskScore: 123},
refunds: [{}]
}
],
barcode: {value: '<string>'},
originalReceiptUrl: '<string>',
paymentLinkUrl: '<string>',
review: {rating: 123, review: '<string>', localizedReview: {}},
signature: {
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
}
})
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/v1/businesses/{businessId}/receipts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'attachmentId' => 123,
'businessId' => 123,
'merchantId' => 123,
'customerId' => 123,
'vendorId' => 123,
'vendorAccountId' => 123,
'categoryId' => 123,
'currency' => '<string>',
'description' => '<string>',
'category' => '<string>',
'note' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'taxesIncluded' => true,
'tags' => [
'<string>'
],
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
],
'lineItemGroups' => [
[
'name' => '<string>',
'description' => '<string>',
'displayOrder' => 123,
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
]
]
],
'taxes' => [
[
'name' => '<string>',
'rate' => 123,
'totalAmount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxIdentificationNumber' => '<string>',
'taxIncluded' => true
]
],
'discounts' => [
[
'promoCodeId' => 123,
'expenseId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'percentage' => 123
]
],
'fees' => [
[
'feeId' => 123,
'name' => '<string>',
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'type' => '<string>'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalFees' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalShipping' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPaid' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'locationId' => 123,
'location' => [
'name' => '<string>',
'description' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'businessCategoryCode' => '<string>',
'currency' => '<string>',
'timezone' => '<string>',
'phoneNumber' => '<string>',
'website' => '<string>',
'facebookUrl' => '<string>',
'instagramUsername' => '<string>',
'twitterUsername' => '<string>',
'isActive' => true,
'locale' => '<string>',
'email' => '<string>',
'logo' => '<string>',
'images' => [
[
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
]
]
],
'customer' => [
'firstName' => '<string>',
'lastName' => '<string>',
'email' => '<string>',
'companyName' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'stateCode' => '<string>',
'country' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>',
'location' => [
'longitude' => 123,
'latitude' => 123
],
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>'
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'isTaxExempt' => true,
'tags' => [
'<string>'
],
'currency' => '<string>',
'acceptsMarketing' => true,
'phoneNumber' => '<string>',
'nickname' => '<string>',
'note' => '<string>',
'locale' => '<string>',
'accountNumber' => '<string>',
'customerNumber' => '<string>',
'birthDate' => '2023-11-07T05:31:56Z',
'metadata' => [
]
],
'receiptId' => '<string>',
'employeeId' => 123,
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'cancelledAt' => '2023-11-07T05:31:56Z',
'cancelReason' => '<string>',
'orderNumber' => '<string>',
'paymentStatus' => '<string>',
'totalWeight' => 123,
'source' => '<string>',
'receiptMetadata' => [
'landingSite' => '<string>',
'customerLocale' => '<string>',
'refferingSite' => '<string>',
'sourcePOS' => '<string>',
'sourceName' => '<string>',
'tags' => '<string>',
'url' => '<string>',
'browserMetadata' => [
'acceptLanguage' => '<string>',
'browserHeight' => 123,
'browserIp' => '<string>',
'browserWidth' => 123,
'sessionHash' => '<string>',
'userAgent' => '<string>'
]
],
'payments' => [
[
'receiptId' => 123,
'statementDescriptor' => '<string>',
'card' => [
'authorizationCode' => '<string>',
'statementDescriptor' => '<string>',
'paymentMethod' => [
'cardholderName' => '<string>',
'cardholderFirstName' => '<string>',
'cardholderLastName' => '<string>',
'country' => '<string>',
'brand' => '<string>',
'displayBrand' => '<string>',
'coBrand' => '<string>',
'expirationMonth' => 123,
'expirationYear' => 123,
'last4' => '<string>',
'dynamicLast4' => '<string>',
'bin' => '<string>',
'fingerprint' => [
'fingerprint' => '<string>'
]
],
'emv' => [
'applicationId' => '<string>',
'applicationName' => '<string>',
'applicationCryptogram' => '<string>',
'cardholderVerificationMethod' => '<string>',
'cardholderVerificationResult' => '<string>'
],
'timeline' => [
'authorizedAt' => '2023-11-07T05:31:56Z',
'capturedAt' => '2023-11-07T05:31:56Z',
'voidedAt' => '2023-11-07T05:31:56Z'
]
],
'cash' => [
'supplied' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'change' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
]
],
'bankAccount' => [
'bankName' => '<string>',
'last4' => '<string>',
'accountNumber' => '<string>',
'routingNumber' => '<string>',
'accountType' => '<string>',
'fingerprint' => '<string>',
'statementDescriptor' => '<string>',
'countryCode' => '<string>'
],
'external' => [
'source' => '<string>',
'sourceId' => '<string>',
'fee' => [
'id' => 123,
'currency' => '<string>',
'amount' => 123,
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'tip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'applicationFee' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'approuved' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'refunded' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'receiptNumber' => '<string>',
'receiptUrl' => '<string>',
'note' => '<string>',
'riskEvaluation' => [
'riskScore' => 123
],
'refunds' => [
[
]
]
]
],
'barcode' => [
'value' => '<string>'
],
'originalReceiptUrl' => '<string>',
'paymentLinkUrl' => '<string>',
'review' => [
'rating' => 123,
'review' => '<string>',
'localizedReview' => [
]
],
'signature' => [
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/v1/businesses/{businessId}/receipts"
payload := strings.NewReader("{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/v1/businesses/{businessId}/receipts")
.header("Content-Type", "application/json")
.body("{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/receipts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"attachmentId\": 123,\n \"businessId\": 123,\n \"merchantId\": 123,\n \"customerId\": 123,\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"categoryId\": 123,\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"note\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"taxesIncluded\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"lineItemGroups\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"displayOrder\": 123,\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ]\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPaid\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"locationId\": 123,\n \"location\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"businessCategoryCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"facebookUrl\": \"<string>\",\n \"instagramUsername\": \"<string>\",\n \"twitterUsername\": \"<string>\",\n \"isActive\": true,\n \"locale\": \"<string>\",\n \"email\": \"<string>\",\n \"logo\": \"<string>\",\n \"images\": [\n {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n ]\n },\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"companyName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"location\": {\n \"longitude\": 123,\n \"latitude\": 123\n },\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"isTaxExempt\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"currency\": \"<string>\",\n \"acceptsMarketing\": true,\n \"phoneNumber\": \"<string>\",\n \"nickname\": \"<string>\",\n \"note\": \"<string>\",\n \"locale\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": {}\n },\n \"receiptId\": \"<string>\",\n \"employeeId\": 123,\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"cancelledAt\": \"2023-11-07T05:31:56Z\",\n \"cancelReason\": \"<string>\",\n \"orderNumber\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"totalWeight\": 123,\n \"source\": \"<string>\",\n \"receiptMetadata\": {\n \"landingSite\": \"<string>\",\n \"customerLocale\": \"<string>\",\n \"refferingSite\": \"<string>\",\n \"sourcePOS\": \"<string>\",\n \"sourceName\": \"<string>\",\n \"tags\": \"<string>\",\n \"url\": \"<string>\",\n \"browserMetadata\": {\n \"acceptLanguage\": \"<string>\",\n \"browserHeight\": 123,\n \"browserIp\": \"<string>\",\n \"browserWidth\": 123,\n \"sessionHash\": \"<string>\",\n \"userAgent\": \"<string>\"\n }\n },\n \"payments\": [\n {\n \"receiptId\": 123,\n \"statementDescriptor\": \"<string>\",\n \"card\": {\n \"authorizationCode\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"paymentMethod\": {\n \"cardholderName\": \"<string>\",\n \"cardholderFirstName\": \"<string>\",\n \"cardholderLastName\": \"<string>\",\n \"country\": \"<string>\",\n \"brand\": \"<string>\",\n \"displayBrand\": \"<string>\",\n \"coBrand\": \"<string>\",\n \"expirationMonth\": 123,\n \"expirationYear\": 123,\n \"last4\": \"<string>\",\n \"dynamicLast4\": \"<string>\",\n \"bin\": \"<string>\",\n \"fingerprint\": {\n \"fingerprint\": \"<string>\"\n }\n },\n \"emv\": {\n \"applicationId\": \"<string>\",\n \"applicationName\": \"<string>\",\n \"applicationCryptogram\": \"<string>\",\n \"cardholderVerificationMethod\": \"<string>\",\n \"cardholderVerificationResult\": \"<string>\"\n },\n \"timeline\": {\n \"authorizedAt\": \"2023-11-07T05:31:56Z\",\n \"capturedAt\": \"2023-11-07T05:31:56Z\",\n \"voidedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"cash\": {\n \"supplied\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"change\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n }\n },\n \"bankAccount\": {\n \"bankName\": \"<string>\",\n \"last4\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"routingNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"statementDescriptor\": \"<string>\",\n \"countryCode\": \"<string>\"\n },\n \"external\": {\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"fee\": {\n \"id\": 123,\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"tip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"applicationFee\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"approuved\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"refunded\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"receiptNumber\": \"<string>\",\n \"receiptUrl\": \"<string>\",\n \"note\": \"<string>\",\n \"riskEvaluation\": {\n \"riskScore\": 123\n },\n \"refunds\": [\n {}\n ]\n }\n ],\n \"barcode\": {\n \"value\": \"<string>\"\n },\n \"originalReceiptUrl\": \"<string>\",\n \"paymentLinkUrl\": \"<string>\",\n \"review\": {\n \"rating\": 123,\n \"review\": \"<string>\",\n \"localizedReview\": {}\n },\n \"signature\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Body
application/jsontext/jsonapplication/*+json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
255Available options:
RECEIPT_OFFICIAL, RECEIPT_OCR, RECEIPT_HTML, RECEIPT_MANUAL, INVOICE_OFFICIAL, INVOICE_OCR, INVOICE_HTML, INVOICE_MANUAL, MILEAGE_EXPENSE Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200
OK
Was this page helpful?
⌘I