Skip to content

Sends a transaction receipt by SMS

Request

POST {{baseURL}}/v2/transactions/{{transactionId}}/share-receipt

This endpoint shares a transaction receipt by SMS.

The following is a typical workflow:

  1. For authorization: POST /v2/transactions
  2. For sharing the receipt: /v2/transactions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/share-receipt.
    The transactionId, the UUID in the path, is returned from POST /v2/transactions.
  3. A successful response is 200 OK with no response body.

Notes for the workflow:

  • The hasCustomerConsent is required and must be true. The endpoint will reject the request if the customer has not explicitly consented to receive an SMS.
  • The mobileNumber does not have to match the one on the original transaction. A receipt can be sent to any phone number the customer provides at time of receipt.

See Also:
To list transactions, see GET /v2/transactions.
To retrieve a transaction by ID, see GET /v2/transactions/{transactionId}.
To create a new transaction, see POST /v2/transactions.
To capture a transaction, see POST /v2/transactions/{transactionId}/capture.
To reverse a transaction, see POST /v2/transactions/{transactionId}/reversal.

Security
Bearer
Path
transactionIdstring, (uuid)required

Specifies the transaction identifier to send a receipt for.

Example:e6d064c0-b2a5-4cb3-bc57-8135123ed791
Bodyapplication/json

Specifies the recipient mobile number for the SMS receipt.

shareBystring, (E.164), [ 1 .. 20 ] characters^(null|\+\d{1,20})$required

Specifies the method that shares this receipt.

Valid values are:

ValueDescription
EmailThe system sends the notification by email.
NoneThe system does not send a notification.
SmsThe system sends the notification by text message.

Example: Sms

Example:"Sms"
recipientstring, (E.164), [ 1 .. 20 ] characters^\+[1-9][0-9]{0,14}$required

Specifies the customer's mobile phone number.

This value is required only for SMS messages.

The field hasCustomerConsent must also be true to send an SMS messages.

A receipt can be sent to any phone number the customer provides at time of receipt.

Example: +14155552309

Example:"+14155552309"
hasCustomerConsentbooleanrequired

Specifies the customer has consented to receive the SMS.

If true, the customer has consented to receive the SMS. The field recipient must also be valid to send an SMS messages.
If false, the customer has not consented to receive the SMS.

Example: true

Example:true
curl -i -X POST \
  https://sandbox.api.flute.com/v2/transactions/e6d064c0-b2a5-4cb3-bc57-8135123ed791/share-receipt \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "mobilePhoneNumber": "+15551234567",
    "hasCustomerConsent": true
  }'

Responses

OK. The receipt was successfully shared.

Response
No content