Skip to main content

Send a receipt

Learn how to email receipts with the Dojo Payments API.

Dojo will automatically send an email receipt to a customer once they have successfully paid. The customer email is provided earlier, when creating the payment intent, inside the Customer schema object:

"customer": {
"emailAddress": "client@gmail.com",
"phoneNumber": "078654321"
}

Each payment has a receipt history which you can view in the Dojo for Business App.

Send additional emails

You can manually send additional receipts to customers. To do this use the endpoint below:

POST /payment-intents/{paymentIntentId}/receipt

In your request, include:

  • emails: the list of email addresses to which the receipt should be sent.

For the full specification, see the API reference.

Request example

The next example below shows how you would capture 10.00 GBP.

# The sandbox API key passed in 'authorization' is public.
# Don't submit any personally identifiable information in any requests made with this key.
# Sign in to developer.dojo.tech to create your own private sandbox key and use that instead
# for secure testing.

curl -v --request POST \
--url https://api.dojo.tech/payment-intents/<paymentIntentId>/receipt \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your_api_key>' \
--header 'Version: 2024-02-05' \
--data '{
"emails": [
"gabriel@dojo.com",
"mari@dojo.com"
]
}'

Response example

If your request is successful, the response will return an empty object.