sendPaymentReceiptEmail
Requires at least one of the permissions payments:payment:send or purchase:payment:send.
Emails a receipt for a payment. An address you pass wins; otherwise the partner's active email contact is used. Refused when no email address is found. A user cannot email a receipt for a payment they cannot open.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SendPaymentReceiptEmail($paymentId: ID!) {
sendPaymentReceiptEmail(paymentId: $paymentId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SendPaymentReceiptEmail($paymentId: ID!) {\n sendPaymentReceiptEmail(paymentId: $paymentId)\n}",
"variables": {
"paymentId": "id"
}
}
EOF
Variables:
{
"paymentId": "id"
}
Response:
{
"data": {
"sendPaymentReceiptEmail": true
}
}
sendPaymentReceiptEmail(
customerEmail: String
paymentId: ID!
): Boolean!
Arguments
sendPaymentReceiptEmail.customerEmail ● String scalar
The recipient's email address.
sendPaymentReceiptEmail.paymentId ● ID! non-null scalar
The ID of the payment the receipt is for.
Type
Boolean scalar
The Boolean scalar type represents true or false.