# Receipt Service

## Create Receipt Request

> Send a transaction receipt to a customer by email.

```json
{"openapi":"3.0.1","info":{"title":"Receipt Service","version":"2.0"},"paths":{"/rest/v2/receipts":{"post":{"tags":["Receipt Service"],"summary":"Create Receipt Request","description":"Send a transaction receipt to a customer by email.","operationId":"postReceipt","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptRequest"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ReceiptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ReceiptResponsePayload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}}}}}},"components":{"schemas":{"ReceiptRequest":{"type":"object","properties":{"id":{"type":"string","description":"The unique transaction identifier for which the system sends the receipt."},"email-address":{"type":"string","description":"The customer's email address that receives the transaction receipt."}},"xml":{"name":"receipt-request"}},"ReceiptResponsePayload":{"type":"object","properties":{"receipt-response":{"$ref":"#/components/schemas/ReceiptResponse"},"payloadType":{"type":"string","description":"The type of payload returned with the response.","xml":{"name":"type","attribute":true}}},"xml":{"name":"payload"}},"ReceiptResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the requested transaction."},"email-address":{"type":"string","description":"Email address where the receipt to be sent."},"display-message":{"type":"string","description":"Message indicating the result of the receipt request."}},"xml":{"name":"receipt-response"}},"ErrorResult":{"type":"object","properties":{"errorResults":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the reason for the error."},"resultCode":{"type":"integer","description":"Numeric code that identifies the type of error returned by the request.","format":"int32"},"timeStamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}}}}}}
```
