# TdApi.MessagePaymentSuccessful (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: MessagePaymentSuccessful

Package it.tdlight.jni

# Class TdApi.MessagePaymentSuccessful

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.MessageContent
it.tdlight.jni.TdApi.MessagePaymentSuccessful

Enclosing class:
  TdApi

    public static class TdApi.MessagePaymentSuccessful
    extends TdApi.MessageContent

A payment has been completed.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static int` | `CONSTRUCTOR` |
`String` | `currency` | Currency for the price of the product.
`long` | `invoiceChatId` | Identifier of the chat, containing the corresponding invoice message; 0 if unknown.
`long` | `invoiceMessageId` | Identifier of the message with the corresponding invoice; can be an identifier of a deleted message.
`long` | `totalAmount` | Total price for the product, in the smallest units of the currency.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`MessagePaymentSuccessful()` | A payment has been completed.
`MessagePaymentSuccessful​(long invoiceChatId, long invoiceMessageId, String currency, long totalAmount)` | A payment has been completed.
`MessagePaymentSuccessful​(DataInput input)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`boolean` | `equals​(Object o)` |
`int` | `getConstructor()` |
`int` | `hashCode()` |
`void` | `serialize​(DataOutput output)` |

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### invoiceChatId

public long invoiceChatId
Identifier of the chat, containing the corresponding invoice message; 0 if unknown.

### invoiceMessageId

public long invoiceMessageId
Identifier of the message with the corresponding invoice; can be an identifier of a deleted message.

### currency

public String currency
Currency for the price of the product.

### totalAmount

public long totalAmount
Total price for the product, in the smallest units of the currency.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### MessagePaymentSuccessful

public MessagePaymentSuccessful()
A payment has been completed.

### MessagePaymentSuccessful

public MessagePaymentSuccessful​(long invoiceChatId, long invoiceMessageId, String currency, long totalAmount)
A payment has been completed.

Parameters:
  `invoiceChatId` - long Identifier of the chat, containing the corresponding invoice message; 0 if unknown.
  `invoiceMessageId` - long Identifier of the message with the corresponding invoice; can be an identifier of a deleted message.
  `currency` - String Currency for the price of the product.
  `totalAmount` - long Total price for the product, in the smallest units of the currency.

### MessagePaymentSuccessful

public MessagePaymentSuccessful​(DataInput input) throws IOException

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize​(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals​(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`