# Models

## The EntityUpdatedResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"EntityUpdatedResponse":{"type":"object","properties":{"updateTime":{"type":"string","description":"Last modified time","format":"date-time"}}}}}}
```

## The IntegrationStatusRequest object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"IntegrationStatusRequest":{"required":["applicationUuid","status"],"type":"object","properties":{"applicationUuid":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"status":{"type":"string","description":"Status","enum":["ACTIVATED","DEACTIVATED","DELETED"]}}}}}}
```

## The PaymentGatewayOperationResultResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PaymentGatewayOperationResultResponse":{"type":"object","properties":{"transactionType":{"type":"string","description":"The type of transaction executed","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"paymentGatewayDecision":{"type":"string","description":"Decision received back from the Payment Gateway for the payment request"},"paymentGatewayReqReferenceNumber":{"type":"string","description":"Payment Reference number received back from the Payment Gateway for the payment request"},"paymentGatewayResponseTimestamp":{"type":"string","description":"Timestamp received back from the Payment Gateway for the payment request","format":"date-time"},"paymentGatewayResponseCode":{"type":"integer","description":"Response code received back from the Payment Gateway for the payment request","format":"int32"},"paymentGatewayErrorDecision":{"type":"string","description":"Error description received back from Payment Gateway if error occurred"},"paymentGatewayAuthReconciliationReferenceNumber":{"type":"string","description":"Unique number generated by Payment Gateway to identify the transaction for the payment request"},"cardType":{"type":"string","description":"The type of card used for the transaction, as received back from the Payment Gateway for the payment request"},"maskedCardNumber":{"type":"string","description":"The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"},"cardExpiryDate":{"type":"string","description":"The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"},"paymentStatus":{"type":"string","description":"New payment status if it was changed"},"paymentStatusId":{"type":"string","description":"The ID of the new payment status"}}}}}}
```

## The BadRequestErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"BadRequestErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"errors":{"type":"array","description":"The list of errors","items":{"type":"string","description":"The list of errors"}}}}}}}
```

## The UnauthorizedErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"UnauthorizedErrorResponse":{"type":"object","properties":{"timestamp":{"type":"string","description":"Timestamp","format":"date-time"},"status":{"type":"integer","description":"HTTP status","format":"int32"},"error":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"path":{"type":"string","description":"Path"}}}}}}
```

## The NotFoundErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"NotFoundErrorResponse":{"type":"object","properties":{"status":{"type":"string","description":"HTTP status","enum":["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]},"message":{"type":"string","description":"The error message"},"errors":{"type":"array","description":"The list of errors","items":{"type":"string","description":"The list of errors"}}}}}}}
```

## The JsonNode object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"JsonNode":{"type":"object","description":"Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"}}}}
```

## The LineItemRequest object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"LineItemRequest":{"required":["name","unitPrice"],"type":"object","properties":{"code":{"maxLength":255,"minLength":0,"type":"string","description":"Type of product"},"name":{"maxLength":255,"minLength":0,"type":"string","description":"Name of the item"},"quantity":{"minimum":1,"type":"integer","description":"Quantity of line items","format":"int32"},"sku":{"maxLength":255,"minLength":0,"type":"string","description":"Identification code for the product"},"unitPrice":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Price of the line item"},"taxAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Tax amount to apply to the line item"}},"description":"The list of items associated with an order, e.g. products. "}}}}
```

## The PayByLinkRequest object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PayByLinkRequest":{"required":["channel","currency","orderNumber","timestamp","to","totalAmount"],"type":"object","properties":{"channel":{"type":"string","description":"The channel used to send the payment link to the end-user. Values: sms, whatsapp, none (only used if you do not want to send the payment link through a channel configured on Chat 2 Pay)","enum":["ChannelType.SMS(name=SMS, id=1)","ChannelType.WHATSAPP(name=WHATSAPP, id=2)","ChannelType.NONE(name=NONE, id=0)"]},"from":{"type":"string","description":"The mobile number of the sender used when sending payment link"},"to":{"type":"string","description":"The end-user’s mobile number that the payment link must be sent to."},"orderNumber":{"maxLength":32,"minLength":0,"type":"string","description":"The order number associated with this payment"},"timestamp":{"type":"string","description":"The date and time that the system sends the request (ISO 8601 format)","format":"date-time"},"currency":{"pattern":"[A-Za-z]{3}","type":"string","description":"The currency that the end-user is using to transact (Three-character ISO Standard Currency Codes)"},"taxAmount":{"minimum":0,"exclusiveMinimum":false,"type":"number","description":"Tax due on this purchase"},"subTotalAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Amount due before tax"},"totalAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Amount that the end-user needs to pay"},"paymentGatewaySettingsId":{"type":"string","description":"ID of payment gateway settings if multiple payment gateway settings were configured"},"additionalData":{"$ref":"#/components/schemas/JsonNode"},"returnPaymentLink":{"type":"boolean","description":"Returns the payment link in the response if set to ‘true’"},"applicationId":{"type":"string","description":"Unique reference number generated by Clickatell to identify the client’s application. This ID can be retrieved from the Clickatell customer portal."},"paymentReviewAutoReversal":{"type":"boolean","description":"Make automatically transaction reversal in case of REVIEW state","default":false},"transactionType":{"type":"string","description":"Specifies the type of transaction that will be performed by the Payment Gateway. Allowed values are: Sale or Authorization. If a value is not supplied, the default transaction type that was set as part of the payment settings for the Chat 2 Pay configuration in the Clickatell Portal will be used.","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"orderLineItems":{"type":"array","description":"The list of items associated with an order, e.g. products. ","items":{"$ref":"#/components/schemas/LineItemRequest"}},"reconciliationId":{"maxLength":60,"minLength":0,"type":"string","description":"Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN."},"merchantDescriptor":{"type":"string","description":"Merchant's business name. This name is displayed on the cardholder’s statement. Check your payment gateway integration guides for restrictions on maximum data length and allowed characters."}}},"JsonNode":{"type":"object","description":"Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"},"LineItemRequest":{"required":["name","unitPrice"],"type":"object","properties":{"code":{"maxLength":255,"minLength":0,"type":"string","description":"Type of product"},"name":{"maxLength":255,"minLength":0,"type":"string","description":"Name of the item"},"quantity":{"minimum":1,"type":"integer","description":"Quantity of line items","format":"int32"},"sku":{"maxLength":255,"minLength":0,"type":"string","description":"Identification code for the product"},"unitPrice":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Price of the line item"},"taxAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Tax amount to apply to the line item"}},"description":"The list of items associated with an order, e.g. products. "}}}}
```

## The PayByLinkTransactionLogResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PayByLinkTransactionLogResponse":{"type":"object","properties":{"paymentLinkRef":{"type":"string","description":"The unique reference number for the payment link generated"},"transactionStatus":{"type":"string","description":"The status of the transaction","enum":["PAYMENT_LINK_REQUEST_RECEIVED","PAYMENT_LINK_SENT","PAYMENT_LINK_DELIVERED","PAYMENT_STATUS_RECEIVED","PAYMENT_STATUS_NOTIFICATION_SENT","RECEIPT_LINK_REQUEST_RECEIVED","RECEIPT_LINK_SENT","PAYMENT_LINK_REQUEST_FAILED","PAYMENT_LINK_SENT_FAILED","PAYMENT_URL_EXPIRED","PAYMENT_LINK_DELIVERY_FAILED","PAYMENT_STATUS_NOTIFICATION_DELIVERY_SUCCESSFUL","PAYMENT_STATUS_NOTIFICATION_DELIVERY_FAILED","RECEIPT_LINK_REQUEST_FAILED","RECEIPT_LINK_SENT_FAILED","RECEIPT_LINK_DELIVERED","RECEIPT_LINK_DELIVERY_FAILED","PAYMENT_LINK_CANCELLED","PAYMENT_LINK_CLICKED"]},"transactionStatusId":{"type":"integer","description":"The ID of the transaction status","format":"int32"},"timestamp":{"type":"string","description":"Timestamp generated by Clickatell’s application (in ISO 8601 format)","format":"date-time"},"error":{"$ref":"#/components/schemas/ThirdPartySystemErrorResponse"},"paymentLink":{"type":"string","description":"Contains the unique payment link for this payment. It will only return in the response if returnPaymentLink was set to true in the request."},"paymentLinkTTL":{"type":"integer","description":"Time to live in minutes for the Payment Link","format":"int32"},"paymentPageTTL":{"type":"integer","description":"Time to live in minutes for the Payment Page","format":"int32"}}},"ThirdPartySystemErrorResponse":{"type":"object","properties":{"code":{"type":"integer","description":"The error code received from third-parties after interaction","format":"int32"},"description":{"type":"string","description":"The error code description received from third-parties after interaction"}},"description":"Error details if request failed"}}}}
```

## The ThirdPartySystemErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"ThirdPartySystemErrorResponse":{"type":"object","properties":{"code":{"type":"integer","description":"The error code received from third-parties after interaction","format":"int32"},"description":{"type":"string","description":"The error code description received from third-parties after interaction"}},"description":"Error details if request failed"}}}}
```

## The IntegratorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"IntegratorResponse":{"type":"object","properties":{"applicationId":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"name":{"type":"string","description":"Name of the integrator"}},"description":"The integrator/application that requested this payment"}}}}
```

## The PaymentStatusLogResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PaymentStatusLogResponse":{"type":"object","properties":{"transactionType":{"type":"string","description":"The type of transaction executed","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"paymentGatewayDecision":{"type":"string","description":"Decision received back from the Payment Gateway for the payment request"},"paymentGatewayReqReferenceNumber":{"type":"string","description":"Payment Reference number received back from the Payment Gateway for the payment request"},"paymentGatewayResponseTimestamp":{"type":"string","description":"Timestamp received back from the Payment Gateway for the payment request","format":"date-time"},"paymentGatewayResponseCode":{"type":"integer","description":"Response code received back from the Payment Gateway for the payment request","format":"int32"},"paymentGatewayErrorDecision":{"type":"string","description":"Error description received back from Payment Gateway if error occurred"},"paymentGatewayAuthReconciliationReferenceNumber":{"type":"string","description":"Unique number generated by Payment Gateway to identify the transaction for the payment request"},"cardType":{"type":"string","description":"The type of card used for the transaction, as received back from the Payment Gateway for the payment request"},"maskedCardNumber":{"type":"string","description":"The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"},"cardExpiryDate":{"type":"string","description":"The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"}},"description":"The list of all payment status transitions"}}}}
```

## The TransactionStatusEntryResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"TransactionStatusEntryResponse":{"type":"object","properties":{"transactionStatusId":{"type":"integer","description":"Transaction status ID","format":"int32"},"transactionStatusName":{"type":"string","description":"Transaction status name"},"created":{"type":"string","description":"Transaction date","format":"date-time"},"httpResponseCode":{"type":"integer","description":"HTTP response code received from third-parties after interaction","format":"int32"},"responseCode":{"type":"string","description":"Error code received from third-parties after interaction"},"responseCodeDescription":{"type":"string","description":"Error description received from third-parties after interaction"}},"description":"The list of all transaction statuses transitions"}}}}
```

## The TransactionStatusNotificationResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"TransactionStatusNotificationResponse":{"type":"object","properties":{"orderNumber":{"type":"string","description":"The order number associated with the payment"},"paymentLinkRef":{"type":"string","description":"The payment link reference of the transaction you requested the details for"},"transactionStatuses":{"type":"array","description":"The list of all transaction statuses transitions","items":{"$ref":"#/components/schemas/TransactionStatusEntryResponse"}},"paymentStatuses":{"type":"array","description":"The list of all payment status transitions","items":{"$ref":"#/components/schemas/PaymentStatusLogResponse"}},"paymentStatus":{"type":"string","description":"The status of the payment","enum":["SUCCESS","FAILED","PENDING","UNKNOWN","REVIEW","REVERSED","VOIDED"]},"paymentStatusId":{"type":"string","description":"The ID of the payment status"},"paymentStatusTimestamp":{"type":"string","description":"The date and time the payment outcome from the Payment Gateway was received (ISO 8601 format)","format":"date-time"},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"receiptLinkRef":{"type":"string","description":"The receipt link reference number for the transaction"},"channelName":{"type":"string","description":"The name of the channel used for the transaction"},"currency":{"type":"string","description":"The currency that the transaction was conducted in"},"taxAmount":{"type":"number","description":"The tax amount of the transaction"},"subTotalAmount":{"type":"number","description":"The sub-total of the transaction (before tax)"},"additionalData":{"type":"string","description":"Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"},"paymentStatusConversionTime":{"type":"string","description":"This field will contain the timestamp received from the payment gateway when a transaction which was in a Review status was finalized.\n","format":"date-time"},"integrator":{"$ref":"#/components/schemas/IntegratorResponse"},"paymentReviewAutoReversal":{"type":"boolean","description":"Make automatically transaction reversal in case of REVIEW state","default":false},"transactionType":{"type":"string","description":"Specifies the type of transaction that was be performed by Payment Gateway.","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"environment":{"type":"string","description":"Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"},"reconciliationId":{"type":"string","description":"Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN."},"merchantDescriptor":{"type":"string","description":"Merchant's business name."}}},"TransactionStatusEntryResponse":{"type":"object","properties":{"transactionStatusId":{"type":"integer","description":"Transaction status ID","format":"int32"},"transactionStatusName":{"type":"string","description":"Transaction status name"},"created":{"type":"string","description":"Transaction date","format":"date-time"},"httpResponseCode":{"type":"integer","description":"HTTP response code received from third-parties after interaction","format":"int32"},"responseCode":{"type":"string","description":"Error code received from third-parties after interaction"},"responseCodeDescription":{"type":"string","description":"Error description received from third-parties after interaction"}},"description":"The list of all transaction statuses transitions"},"PaymentStatusLogResponse":{"type":"object","properties":{"transactionType":{"type":"string","description":"The type of transaction executed","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"paymentGatewayDecision":{"type":"string","description":"Decision received back from the Payment Gateway for the payment request"},"paymentGatewayReqReferenceNumber":{"type":"string","description":"Payment Reference number received back from the Payment Gateway for the payment request"},"paymentGatewayResponseTimestamp":{"type":"string","description":"Timestamp received back from the Payment Gateway for the payment request","format":"date-time"},"paymentGatewayResponseCode":{"type":"integer","description":"Response code received back from the Payment Gateway for the payment request","format":"int32"},"paymentGatewayErrorDecision":{"type":"string","description":"Error description received back from Payment Gateway if error occurred"},"paymentGatewayAuthReconciliationReferenceNumber":{"type":"string","description":"Unique number generated by Payment Gateway to identify the transaction for the payment request"},"cardType":{"type":"string","description":"The type of card used for the transaction, as received back from the Payment Gateway for the payment request"},"maskedCardNumber":{"type":"string","description":"The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"},"cardExpiryDate":{"type":"string","description":"The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"}},"description":"The list of all payment status transitions"},"IntegratorResponse":{"type":"object","properties":{"applicationId":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"name":{"type":"string","description":"Name of the integrator"}},"description":"The integrator/application that requested this payment"}}}}
```

## The SendPaymentOutcomeRequest object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"SendPaymentOutcomeRequest":{"type":"object","properties":{"orderNo":{"type":"string","description":"The order number associated with the payment"},"paymentLinkRef":{"type":"string","description":"The payment link reference of the transaction you requested the details for"},"from":{"type":"string","description":"The mobile number of the sender used when sending payment link."},"to":{"type":"string","description":"The end-user’s mobile number that the payment link was sent to (In international format, e.g., 27831234567)."},"paymentStatus":{"type":"string","description":"The new status of the payment"},"paymentStatusId":{"type":"string","description":"The ID of the payment status"},"currency":{"type":"string","description":"The currency that the transaction was conducted in"},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"additionalData":{"type":"string","description":"Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"},"paymentStatusConversionTime":{"type":"string","description":"This field will contain the timestamp received from the Payment Gateway when a transaction which was in a Review status was finalized.\n"},"paymentStatuses":{"type":"array","description":"The list of all payment status transitions","items":{"$ref":"#/components/schemas/PaymentStatusLogResponse"}},"environment":{"type":"string","description":"Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"}}},"PaymentStatusLogResponse":{"type":"object","properties":{"transactionType":{"type":"string","description":"The type of transaction executed","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"paymentGatewayDecision":{"type":"string","description":"Decision received back from the Payment Gateway for the payment request"},"paymentGatewayReqReferenceNumber":{"type":"string","description":"Payment Reference number received back from the Payment Gateway for the payment request"},"paymentGatewayResponseTimestamp":{"type":"string","description":"Timestamp received back from the Payment Gateway for the payment request","format":"date-time"},"paymentGatewayResponseCode":{"type":"integer","description":"Response code received back from the Payment Gateway for the payment request","format":"int32"},"paymentGatewayErrorDecision":{"type":"string","description":"Error description received back from Payment Gateway if error occurred"},"paymentGatewayAuthReconciliationReferenceNumber":{"type":"string","description":"Unique number generated by Payment Gateway to identify the transaction for the payment request"},"cardType":{"type":"string","description":"The type of card used for the transaction, as received back from the Payment Gateway for the payment request"},"maskedCardNumber":{"type":"string","description":"The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"},"cardExpiryDate":{"type":"string","description":"The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"}},"description":"The list of all payment status transitions"}}}}
```

## The CurrencyResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"CurrencyResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Currency unique identifier","format":"int32"},"iso":{"type":"string","description":"The ISO currency code"},"name":{"type":"string","description":"Name of currency"},"symbol":{"type":"string","description":"Symbol used to display currency"},"isDefault":{"type":"boolean","description":"True if this is set as the default currency; otherwise, false"}},"description":"Supported currencies"}}}}
```

## The WidgetConfigResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"WidgetConfigResponse":{"type":"object","properties":{"apiKey":{"type":"string","description":"API key required to access the C2P APIs"},"enabledChannels":{"type":"array","description":"List of enabled channels used to send the payment link","items":{"type":"string","description":"List of enabled channels used to send the payment link"}},"supportedCurrencies":{"uniqueItems":true,"type":"array","description":"List of currencies selected in payment gateway settings","items":{"$ref":"#/components/schemas/CurrencyResponse"}},"mc2AccountId":{"type":"string","description":"MC2 account ID"},"chatFlowClientId":{"type":"string","description":"ChatFlow client ID"},"configId":{"type":"string","description":"Chat 2 Pay configuration ID"},"environment":{"type":"string","description":"Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"}}},"CurrencyResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Currency unique identifier","format":"int32"},"iso":{"type":"string","description":"The ISO currency code"},"name":{"type":"string","description":"Name of currency"},"symbol":{"type":"string","description":"Symbol used to display currency"},"isDefault":{"type":"boolean","description":"True if this is set as the default currency; otherwise, false"}},"description":"Supported currencies"}}}}
```

## The PaymentReceiptResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PaymentReceiptResponse":{"type":"object","properties":{"receiptLinkRef":{"type":"string","description":"The unique reference number for the receipt link generated"},"orderNumber":{"type":"string","description":"The order number that the receipt is for"},"timestamp":{"type":"string","description":"The date and time the instruction to create the link was received (In ISO 8601 format)","format":"date-time"},"transactionStatus":{"type":"string","description":"The current status of the transaction","enum":["PAYMENT_LINK_REQUEST_RECEIVED","PAYMENT_LINK_SENT","PAYMENT_LINK_DELIVERED","PAYMENT_STATUS_RECEIVED","PAYMENT_STATUS_NOTIFICATION_SENT","RECEIPT_LINK_REQUEST_RECEIVED","RECEIPT_LINK_SENT","PAYMENT_LINK_REQUEST_FAILED","PAYMENT_LINK_SENT_FAILED","PAYMENT_URL_EXPIRED","PAYMENT_LINK_DELIVERY_FAILED","PAYMENT_STATUS_NOTIFICATION_DELIVERY_SUCCESSFUL","PAYMENT_STATUS_NOTIFICATION_DELIVERY_FAILED","RECEIPT_LINK_REQUEST_FAILED","RECEIPT_LINK_SENT_FAILED","RECEIPT_LINK_DELIVERED","RECEIPT_LINK_DELIVERY_FAILED","PAYMENT_LINK_CANCELLED","PAYMENT_LINK_CLICKED"]},"transactionStatusId":{"type":"integer","description":"The ID of the transaction status","format":"int32"},"error":{"$ref":"#/components/schemas/ThirdPartySystemErrorResponse"}}},"ThirdPartySystemErrorResponse":{"type":"object","properties":{"code":{"type":"integer","description":"The error code received from third-parties after interaction","format":"int32"},"description":{"type":"string","description":"The error code description received from third-parties after interaction"}},"description":"Error details if request failed"}}}}
```

## The PaymentReceiptRequest object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PaymentReceiptRequest":{"required":["paymentLinkRef","receiptLink","timestamp"],"type":"object","properties":{"receiptLink":{"type":"string","description":"The link that is sent to the end-user to direct them to their order receipt"},"paymentLinkRef":{"type":"string","description":"The unique reference number for the payment link generated"},"timestamp":{"type":"string","description":"The date and time the instruction to create the link was sent","format":"date-time"}}}}}}
```

## The PaymentCancellationResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"PaymentCancellationResponse":{"type":"object","properties":{"paymentLinkRef":{"type":"string","description":"Payment Link Reference Number"},"transactionStatus":{"type":"string","description":"Transaction status of payment link"},"transactionStatusId":{"type":"string","description":"The ID of transaction status for payment link"},"additionalData":{"type":"string","description":"Additional data field for payment link"},"timestamp":{"type":"string","description":"Timestamp of payment link","format":"date-time"}}}}}}
```

## The LineItemResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"LineItemResponse":{"required":["name","unitPrice"],"type":"object","properties":{"code":{"maxLength":255,"minLength":0,"type":"string","description":"Type of product"},"name":{"maxLength":255,"minLength":0,"type":"string","description":"Name of the item"},"quantity":{"minimum":1,"type":"integer","description":"Quantity of line items","format":"int32"},"sku":{"maxLength":255,"minLength":0,"type":"string","description":"Identification code for the product"},"unitPrice":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Price of the line item"},"taxAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Tax amount to apply to the line item"}},"description":"The list of items associated with an order, e.g. products. "}}}}
```

## The TransactionStatusEndpointResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"TransactionStatusEndpointResponse":{"type":"object","properties":{"orderNumber":{"type":"string","description":"The order number associated with the payment"},"paymentLinkRef":{"type":"string","description":"The payment link reference of the transaction you requested the details for"},"transactionStatuses":{"type":"array","description":"The list of all transaction statuses transitions","items":{"$ref":"#/components/schemas/TransactionStatusEntryResponse"}},"paymentStatuses":{"type":"array","description":"The list of all payment status transitions","items":{"$ref":"#/components/schemas/PaymentStatusLogResponse"}},"paymentStatus":{"type":"string","description":"The status of the payment","enum":["SUCCESS","FAILED","PENDING","UNKNOWN","REVIEW","REVERSED","VOIDED"]},"paymentStatusId":{"type":"string","description":"The ID of the payment status"},"paymentStatusTimestamp":{"type":"string","description":"The date and time the payment outcome from the Payment Gateway was received (ISO 8601 format)","format":"date-time"},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"receiptLinkRef":{"type":"string","description":"The receipt link reference number for the transaction"},"channelName":{"type":"string","description":"The name of the channel used for the transaction"},"currency":{"type":"string","description":"The currency that the transaction was conducted in"},"taxAmount":{"type":"number","description":"The tax amount of the transaction"},"subTotalAmount":{"type":"number","description":"The sub-total of the transaction (before tax)"},"additionalData":{"type":"string","description":"Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"},"paymentStatusConversionTime":{"type":"string","description":"This field will contain the timestamp received from the payment gateway when a transaction which was in a Review status was finalized.\n","format":"date-time"},"integrator":{"$ref":"#/components/schemas/IntegratorResponse"},"paymentReviewAutoReversal":{"type":"boolean","description":"Make automatically transaction reversal in case of REVIEW state","default":false},"transactionType":{"type":"string","description":"Specifies the type of transaction that was be performed by Payment Gateway.","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"environment":{"type":"string","description":"Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"},"reconciliationId":{"type":"string","description":"Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN."},"merchantDescriptor":{"type":"string","description":"Merchant's business name."},"orderLineItems":{"type":"array","description":"The list of items associated with an order, e.g. products. ","items":{"$ref":"#/components/schemas/LineItemResponse"}}}},"TransactionStatusEntryResponse":{"type":"object","properties":{"transactionStatusId":{"type":"integer","description":"Transaction status ID","format":"int32"},"transactionStatusName":{"type":"string","description":"Transaction status name"},"created":{"type":"string","description":"Transaction date","format":"date-time"},"httpResponseCode":{"type":"integer","description":"HTTP response code received from third-parties after interaction","format":"int32"},"responseCode":{"type":"string","description":"Error code received from third-parties after interaction"},"responseCodeDescription":{"type":"string","description":"Error description received from third-parties after interaction"}},"description":"The list of all transaction statuses transitions"},"PaymentStatusLogResponse":{"type":"object","properties":{"transactionType":{"type":"string","description":"The type of transaction executed","enum":["TransactionType.AUTHORIZATION(name=Authorization, id=1)","TransactionType.SALE(name=Sale, id=2)","TransactionType.VOID(name=Void, id=3)","TransactionType.CAPTURE(name=Capture, id=4)"]},"totalAmount":{"type":"number","description":"The total amount of the transaction"},"paymentGatewayDecision":{"type":"string","description":"Decision received back from the Payment Gateway for the payment request"},"paymentGatewayReqReferenceNumber":{"type":"string","description":"Payment Reference number received back from the Payment Gateway for the payment request"},"paymentGatewayResponseTimestamp":{"type":"string","description":"Timestamp received back from the Payment Gateway for the payment request","format":"date-time"},"paymentGatewayResponseCode":{"type":"integer","description":"Response code received back from the Payment Gateway for the payment request","format":"int32"},"paymentGatewayErrorDecision":{"type":"string","description":"Error description received back from Payment Gateway if error occurred"},"paymentGatewayAuthReconciliationReferenceNumber":{"type":"string","description":"Unique number generated by Payment Gateway to identify the transaction for the payment request"},"cardType":{"type":"string","description":"The type of card used for the transaction, as received back from the Payment Gateway for the payment request"},"maskedCardNumber":{"type":"string","description":"The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"},"cardExpiryDate":{"type":"string","description":"The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"}},"description":"The list of all payment status transitions"},"IntegratorResponse":{"type":"object","properties":{"applicationId":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"name":{"type":"string","description":"Name of the integrator"}},"description":"The integrator/application that requested this payment"},"LineItemResponse":{"required":["name","unitPrice"],"type":"object","properties":{"code":{"maxLength":255,"minLength":0,"type":"string","description":"Type of product"},"name":{"maxLength":255,"minLength":0,"type":"string","description":"Name of the item"},"quantity":{"minimum":1,"type":"integer","description":"Quantity of line items","format":"int32"},"sku":{"maxLength":255,"minLength":0,"type":"string","description":"Identification code for the product"},"unitPrice":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Price of the line item"},"taxAmount":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"Tax amount to apply to the line item"}},"description":"The list of items associated with an order, e.g. products. "}}}}
```

## The DetailedWidgetConfigResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"DetailedWidgetConfigResponse":{"type":"object","properties":{"updateTime":{"type":"string","description":"Last modified time","format":"date-time"},"whatsappChannelEnabled":{"type":"boolean","description":"Checks if WA omni integration is enabled"},"smsChannelEnabled":{"type":"boolean","description":"Checks if SMS omni integration is enabled"},"integrators":{"uniqueItems":true,"type":"array","description":"Integrators","items":{"$ref":"#/components/schemas/IntegratorStatusResponse"}},"apiKey":{"type":"string","description":"Api key"},"supportedCurrencies":{"uniqueItems":true,"type":"array","description":"Supported currencies","items":{"$ref":"#/components/schemas/CurrencyResponse"}},"environment":{"type":"string","description":"Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"}}},"IntegratorStatusResponse":{"type":"object","properties":{"applicationId":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"name":{"type":"string","description":"Name of the integrator"},"status":{"type":"string","description":"Status","enum":["ACTIVATED","DEACTIVATED","DELETED"]},"type":{"type":"string","description":"Integrator type","enum":["OMS","CLICKATELL_PRODUCT","APPLICATION"]}},"description":"Integrators"},"CurrencyResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Currency unique identifier","format":"int32"},"iso":{"type":"string","description":"The ISO currency code"},"name":{"type":"string","description":"Name of currency"},"symbol":{"type":"string","description":"Symbol used to display currency"},"isDefault":{"type":"boolean","description":"True if this is set as the default currency; otherwise, false"}},"description":"Supported currencies"}}}}
```

## The IntegratorStatusResponse object

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"components":{"schemas":{"IntegratorStatusResponse":{"type":"object","properties":{"applicationId":{"type":"string","description":"Unique identifier generated for each custom application the customer links to the account"},"name":{"type":"string","description":"Name of the integrator"},"status":{"type":"string","description":"Status","enum":["ACTIVATED","DEACTIVATED","DELETED"]},"type":{"type":"string","description":"Integrator type","enum":["OMS","CLICKATELL_PRODUCT","APPLICATION"]}},"description":"Integrators"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.clickatell.com/developers-api-reference/models-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
