View as Markdown

llms.txt

The API reference isn't available right now

This instance couldn't load its API specification. The reference returns as soon as the specification is readable again.

Back to the API reference

No such operation

This instance documents no operation under that identifier. It may have been renamed, or it may belong to a feature this installation hasn't enabled.

Back to the API reference

This reference may be out of date

This instance couldn't reach its API specification on the last attempt, so this page shows the copy fetched before that. Anything added or changed since then is missing here, and the reference updates itself as soon as the specification is readable again. Last fetched 2026-12-03 02:41 UTC.

API reference Transactions

Send a transaction receipt by email or text message.

POST /api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send deprecated

Requires: Transactions.Receipts.Send, Transactions.Reports.View, merchant scope.

Sends one of the transaction's receipts to the customer. `Email` sends the receipt as it prints, and needs the merchant's email receipts setting on. `Text` sends a short summary: the merchant's name, the amount, the card brand and last four digits, the date and the approval code, with no link. A card is never identified by more than its brand and last four digits. A mobile number that has opted out of text messages answers `200` with `sent` set to `false`. Each receipt send is limited per API key and per transaction; past either limit the route answers `429` with a `Retry-After` header.

Signed in, you can send this request to your own sandbox merchant from the console and read the answer. Sign in to try it.

Example request

Each example below is one request, shown in every language. Choose an example and a language, then replace {{BASE_URL}} with the address of the API you are calling and {{API_KEY}} with your own key.

The request body is a SendTransactionReceiptInput. See the Request body section below for its fields.

Code sample language
Request example

Emails the receipt, as it prints, to the customer's address. Put the transaction id in the route as transactionId and a receipt id from the transaction's receipt list as receiptId. The merchant's email receipts setting must be on.

cURL

curl -X POST "{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send" \
  -H "api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Email",
  "emailAddress": "jordan.lee@example.com"
}'

PowerShell

$headers = @{
    'api-key' = '{{API_KEY}}'
}

$body = @'
{
  "channel": "Email",
  "emailAddress": "jordan.lee@example.com"
}
'@

$response = Invoke-RestMethod -Method POST -Uri '{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send' `
    -Headers $headers -ContentType 'application/json' -Body $body

npm install @winkpg/winkpg-api

TypeScript (SDK)

import { Configuration, TransactionsApi } from '@winkpg/winkpg-api';

const api = new TransactionsApi(new Configuration({
  basePath: '{{BASE_URL}}',
  apiKey: '{{API_KEY}}',
}));

const { data } = await api.transactionReceiptsSend("3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", {
  "channel": "Email",
  "emailAddress": "jordan.lee@example.com"
});

TypeScript (raw HTTP)

const response = await fetch('{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send', {
  method: 'POST',
  headers: {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "channel": "Email",
    "emailAddress": "jordan.lee@example.com"
  }),
});

const data = await response.json();

dotnet add package WinkPg.Api.Client

C# (SDK)

using WinkPg.Api.Client.Api;
using WinkPg.Api.Client.Client;
using System.Text.Json;

var config = new Configuration { BasePath = "{{BASE_URL}}" };
config.AddApiKey("api-key", "{{API_KEY}}");

var api = new TransactionsApi(config);
var body = JsonSerializer.Deserialize<SendTransactionReceiptInput>("""
    {
      "channel": "Email",
      "emailAddress": "jordan.lee@example.com"
    }
    """);

var result = await api.TransactionReceiptsSendAsync(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), body);

C# (raw HTTP)

using System.Text;

using var http = new HttpClient { BaseAddress = new Uri("{{BASE_URL}}") };

var request = new HttpRequestMessage(new HttpMethod("POST"), "/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send");
request.Headers.Add("api-key", "{{API_KEY}}");

request.Content = new StringContent("""
    {
      "channel": "Email",
      "emailAddress": "jordan.lee@example.com"
    }
    """, Encoding.UTF8, "application/json");

var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();

pip install winkpg-api

Python (SDK)

import winkpg_api

configuration = winkpg_api.Configuration(host="{{BASE_URL}}")
configuration.api_key["ApiKey"] = "{{API_KEY}}"

with winkpg_api.ApiClient(configuration) as client:
    api = winkpg_api.TransactionsApi(client)
    body = winkpg_api.SendTransactionReceiptInput.from_dict({
      "channel": "Email",
      "emailAddress": "jordan.lee@example.com"
    })
    result = api.transaction_receipts_send("3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", body)

pip install requests

Python (raw HTTP)

import requests

headers = {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
}

body = {
  "channel": "Email",
  "emailAddress": "jordan.lee@example.com"
}

response = requests.request(
    "POST",
    "{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send",
    headers=headers,
    json=body,
)
response.raise_for_status()
data = response.json()

Texts a short summary of the receipt to the customer's mobile number: the merchant's name, the amount, the card brand and last four digits, the date and the approval code. A number that has opted out answers with sent set to false.

cURL

curl -X POST "{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send" \
  -H "api-key: {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Text",
  "mobileNumber": "\u002B15555550123"
}'

PowerShell

$headers = @{
    'api-key' = '{{API_KEY}}'
}

$body = @'
{
  "channel": "Text",
  "mobileNumber": "\u002B15555550123"
}
'@

$response = Invoke-RestMethod -Method POST -Uri '{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send' `
    -Headers $headers -ContentType 'application/json' -Body $body

npm install @winkpg/winkpg-api

TypeScript (SDK)

import { Configuration, TransactionsApi } from '@winkpg/winkpg-api';

const api = new TransactionsApi(new Configuration({
  basePath: '{{BASE_URL}}',
  apiKey: '{{API_KEY}}',
}));

const { data } = await api.transactionReceiptsSend("3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", {
  "channel": "Text",
  "mobileNumber": "\u002B15555550123"
});

TypeScript (raw HTTP)

const response = await fetch('{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send', {
  method: 'POST',
  headers: {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "channel": "Text",
    "mobileNumber": "\u002B15555550123"
  }),
});

const data = await response.json();

dotnet add package WinkPg.Api.Client

C# (SDK)

using WinkPg.Api.Client.Api;
using WinkPg.Api.Client.Client;
using System.Text.Json;

var config = new Configuration { BasePath = "{{BASE_URL}}" };
config.AddApiKey("api-key", "{{API_KEY}}");

var api = new TransactionsApi(config);
var body = JsonSerializer.Deserialize<SendTransactionReceiptInput>("""
    {
      "channel": "Text",
      "mobileNumber": "\u002B15555550123"
    }
    """);

var result = await api.TransactionReceiptsSendAsync(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), body);

C# (raw HTTP)

using System.Text;

using var http = new HttpClient { BaseAddress = new Uri("{{BASE_URL}}") };

var request = new HttpRequestMessage(new HttpMethod("POST"), "/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send");
request.Headers.Add("api-key", "{{API_KEY}}");

request.Content = new StringContent("""
    {
      "channel": "Text",
      "mobileNumber": "\u002B15555550123"
    }
    """, Encoding.UTF8, "application/json");

var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();

pip install winkpg-api

Python (SDK)

import winkpg_api

configuration = winkpg_api.Configuration(host="{{BASE_URL}}")
configuration.api_key["ApiKey"] = "{{API_KEY}}"

with winkpg_api.ApiClient(configuration) as client:
    api = winkpg_api.TransactionsApi(client)
    body = winkpg_api.SendTransactionReceiptInput.from_dict({
      "channel": "Text",
      "mobileNumber": "\u002B15555550123"
    })
    result = api.transaction_receipts_send("3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa6", body)

pip install requests

Python (raw HTTP)

import requests

headers = {
    "api-key": "{{API_KEY}}",
    "Content-Type": "application/json",
}

body = {
  "channel": "Text",
  "mobileNumber": "\u002B15555550123"
}

response = requests.request(
    "POST",
    "{{BASE_URL}}/api/transactions/by-merchant/{merchantId}/{transactionId}/receipts/{receiptId}/send",
    headers=headers,
    json=body,
)
response.raise_for_status()
data = response.json()

Parameters

Name In Type Description
merchantId required path string (uuid) The merchant that owns the transaction.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
transactionId required path string (uuid) The transaction the receipt belongs to.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
receiptId required path string (uuid) The receipt to send, from the transaction's `receiptIds` or the receipt list.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
suppressNulls required query boolean If true, omit properties with null values.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.

Request body

application/json , required

Field Type Description
channel required ReceiptDeliveryChannel ReceiptDeliveryChannel How to send the receipt: `Email` or `Text`. nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
Email An email carrying the receipt as it prints, to the email address in the request.
Text A text message to the mobile number in the request. The text is a short summary of the receipt: the merchant's name, the amount, the card brand and last four digits, the date and the approval code. It carries no link.
emailAddress required string The email address to send the receipt to. Required when `channel` is `Email`, and must be omitted otherwise. Conditional: When EmailAddress is not empty. Must be a valid email. Required: When Channel == Email. Conditional: When Channel == Text. nullablemax length 100
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
mobileNumber required string The mobile number to text the receipt to. Required when `channel` is `Text`, and must be omitted otherwise. Send it in international form, such as `+15555550123`; a 10-digit number is read as a North American number. Conditional: When MobileNumber is not empty. Required: When Channel == Text. Conditional: When Channel == Email. nullablemax length 32
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.

This request body has no documented fields.

Responses

Response status

The send outcome. `sent` is `false` when the recipient has opted out.

Body: SendTransactionReceiptResult SendTransactionReceiptResult Each item has these fields.

Field Type Description
receiptId required string (uuid) The receipt that was sent.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
channel required ReceiptDeliveryChannel ReceiptDeliveryChannel The channel the receipt was sent by.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
Email An email carrying the receipt as it prints, to the email address in the request.
Text A text message to the mobile number in the request. The text is a short summary of the receipt: the merchant's name, the amount, the card brand and last four digits, the date and the approval code. It carries no link.
sent required boolean Whether the message was handed to the email or text message provider. `true` does not mean it was delivered: delivery is reported by the provider later.
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
notSentReason required ReceiptNotSentReason ReceiptNotSentReason Why no message was sent. Present only when `sent` is `false`. nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
RecipientOptedOut The mobile number has opted out of text messages from this merchant, for example by replying STOP. Nothing was sent, and sending again sends nothing until the recipient opts back in.

This response has no documented body fields.

The request was refused because a rate limit was exceeded, or because something a later retry can clear stopped it. A rate limit refusal carries an `application/problem+json` body: wait at least the interval `Retry-After` names before retrying, then back off. Limits are tuned per deployment, so read the allowance from the response headers rather than assuming a fixed ceiling. Any other refusal carries the standard error envelope as `application/json`, and its `error.code` names the cause.

Body: RemoteServiceErrorResponse RemoteServiceErrorResponse Each item has these fields.

Field Type Description
error required RemoteServiceErrorInfo RemoteServiceErrorInfo
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.

This response has no documented body fields.

  1. 400 Bad Request The channel is missing or unknown, or the recipient is missing, malformed or belongs to the other channel.
  2. 401 Unauthorized Unauthorized. The request carried no API key or signed-in session, or the key it carried is invalid, revoked or expired.
  3. 403 Forbidden The merchant's email receipts setting is off, for an email send.
  4. 404 Not Found No receipt with that id belongs to that transaction and is visible to this caller. A receipt of another merchant, or of another transaction, answers the same way.
  5. 500 Internal Server Error Internal server error. The platform failed unexpectedly while handling the request. If it keeps failing, contact support and quote the correlation id, which the response carries in the `X-Correlation-Id` header and as `error.data.correlationId`.
  6. 501 Not Implemented Not implemented. The operation is declared but has no implementation on this deployment, so no request to it can succeed. Retrying does not help.
  7. default The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. The error reference lists the values `error.code` can take.The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. The error reference lists the values `error.code` can take.

Body: RemoteServiceErrorResponse RemoteServiceErrorResponse Each item has these fields.

Field Type Description
error required RemoteServiceErrorInfo RemoteServiceErrorInfo
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.

Fields of RemoteServiceErrorInfo:

Field Type Description
code required string nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
message required string nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
details required string nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
data required object nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
validationErrors required array of RemoteServiceValidationErrorInfo array of RemoteServiceValidationErrorInfo nullable
Values: Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.

This body has no documented fields.

This response has no documented body fields.

Errors

A failed request returns the platform error envelope. The error reference lists every value error.code can carry and shows the four response shapes.

Codes declared by Transactions

Authentication

  • ApiKey with scopes

Reconnecting to the server

Could not reconnect

This session has ended

Attempt 1

Your work on this page is still here. Retrying keeps it; reloading starts the page again.

The server no longer holds this page's state, so it has to be loaded again.