# Chat 2 Pay API

## Update application's integration status

> This API can be used to disable/enable integration with Chat 2 Pay programmatically.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"]}}},"EntityUpdatedResponse":{"type":"object","properties":{"updateTime":{"type":"string","description":"Last modified time","format":"date-time"}}}}},"paths":{"/api/v2/integration":{"put":{"tags":["Chat 2 Pay API"],"summary":"Update application's integration status","description":"This API can be used to disable/enable integration with Chat 2 Pay programmatically.","operationId":"updateIntegrationStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationStatusRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EntityUpdatedResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EntityUpdatedResponse"}}}},"404":{"description":"Chat 2 Pay configuration not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EntityUpdatedResponse"}}}}}}}}}
```

## Reverse authorization and void a capture

> This API can be used to reverse payment authorizations or void unsettled captures that were performed via Chat 2 Pay. Reversals cannot be performed on settled payments – a refund will need to be performed via the Payment Gateway back-office.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"}}},"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"}}}},"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"}}},"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"}}}}}},"paths":{"/api/v2/payment/{paymentLinkRef}/reverse":{"post":{"tags":["Chat 2 Pay API"],"summary":"Reverse authorization and void a capture","description":"This API can be used to reverse payment authorizations or void unsettled captures that were performed via Chat 2 Pay. Reversals cannot be performed on settled payments – a refund will need to be performed via the Payment Gateway back-office.","operationId":"reverseTransaction","parameters":[{"name":"paymentLinkRef","in":"path","description":"The unique reference number for the payment link generated","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentGatewayOperationResultResponse"}}}},"400":{"description":"Operation failed because of Chat 2 Pay validation rules","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Configured extension or transaction not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}}}
```

## Request to capture the payment amount

> This API can be used to capture payment authorizations that were performed via Chat 2 Pay. Only one successful payment capture can be performed against one payment authorization (multiple partial captures against one authorization are not supported currently).

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"}}},"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"}}}},"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"}}},"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"}}}}}},"paths":{"/api/v2/payment/{paymentLinkRef}/capture":{"post":{"tags":["Chat 2 Pay API"],"summary":"Request to capture the payment amount","description":"This API can be used to capture payment authorizations that were performed via Chat 2 Pay. Only one successful payment capture can be performed against one payment authorization (multiple partial captures against one authorization are not supported currently).","operationId":"capturePayment","parameters":[{"name":"paymentLinkRef","in":"path","description":"The unique reference number for the payment link generated","required":true,"schema":{"type":"string"}},{"name":"amount","in":"query","description":"The amount for capture. The total amount will be used if not specified.","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentGatewayOperationResultResponse"}}}},"400":{"description":"Operation failed because of Chat 2 Pay validation rules","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Chat 2 Pay configuration or transaction not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}}}
```

## Generate and send a payment link

> Generate and send a Chat 2 Pay message containing the payment link to the end-user and create a transaction log entry for the Chat 2 Pay request.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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. "},"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"},"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"}}}},"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"}}},"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"}}}}}},"paths":{"/api/v2/chat-2-pay":{"post":{"tags":["Chat 2 Pay API"],"summary":"Generate and send a payment link","description":"Generate and send a Chat 2 Pay message containing the payment link to the end-user and create a transaction log entry for the Chat 2 Pay request.","operationId":"createPayByLinkTransactionLog","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayByLinkRequest"}}},"required":true},"responses":{"201":{"description":"Payment link created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayByLinkTransactionLogResponse"}}}},"400":{"description":"Invalid Chat 2 Pay request, various validation rules broken","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Chat 2 Pay configuration not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}}}
```

## Create payment receipt

> Use this endpoint in conjunction with the Chat 2 Pay API to send your end-users a link to their order receipt via the same channel used to send the payment link.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"}}},"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"},"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"}}},"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"}}}}}},"paths":{"/api/v2/order-receipt":{"post":{"tags":["Chat 2 Pay API"],"summary":"Create payment receipt","description":"Use this endpoint in conjunction with the Chat 2 Pay API to send your end-users a link to their order receipt via the same channel used to send the payment link.","operationId":"createPaymentReceipt","requestBody":{"description":"Sends your end-users a link to their order receipt via the same channel used to send the payment link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReceiptRequest"}}},"required":true},"responses":{"201":{"description":"Created, receipt link sent successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentReceiptResponse"}}}},"400":{"description":"Created, receipt link sent failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentReceiptResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Chat 2 Pay configuration or transaction not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}}}
```

## Cancels a payment link

> This API can be used to cancel the payment link. It is only possible to cancel a payment link that hasn’t been clicked yet. The cancellation of a payment link doesn’t affect a payment that is in progress.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"}}},"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"}}}},"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"}}},"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"}}}}}},"paths":{"/api/v2/cancel/{paymentLinkRef}":{"post":{"tags":["Chat 2 Pay API"],"summary":"Cancels a payment link","description":"This API can be used to cancel the payment link. It is only possible to cancel a payment link that hasn’t been clicked yet. The cancellation of a payment link doesn’t affect a payment that is in progress.","operationId":"cancelLink","parameters":[{"name":"paymentLinkRef","in":"path","description":"The unique reference number for the payment link generated","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentCancellationResponse"}}}},"400":{"description":"Operation failed because of validation rules","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Configured extension or transaction not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}}}}}}}
```

## Get transaction details

> Get a detailed breakdown of a transaction, including the transaction statuses and payment outcome.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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. "},"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"}}}}},"paths":{"/api/v2/chat-2-pay/transaction-status":{"get":{"tags":["Chat 2 Pay API"],"summary":"Get transaction details","description":"Get a detailed breakdown of a transaction, including the transaction statuses and payment outcome.","operationId":"getTransactionStatus","parameters":[{"name":"orderNumber","in":"query","description":"The order number associated with the payment","required":false,"schema":{"type":"string"}},{"name":"paymentLinkRef","in":"query","description":"The payment link reference of the transaction you requested the details for","required":false,"schema":{"type":"string"}},{"name":"receiptLinkRef","in":"query","description":"The unique reference number for the receipt link generated","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionStatusEndpointResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}}}}}}}
```

## Get Chat 2 Pay configuration

> This API returns the configuration data for the configured Chat 2 Pay product.

```json
{"openapi":"3.0.1","info":{"title":"Chat 2 Pay API","version":"2"},"servers":[{"url":"https://chat2pay-service.clickatell.com/"}],"security":[{"c2p":[]}],"components":{"securitySchemes":{"c2p":{"type":"apiKey","description":"Chat 2 Pay API Key Authorization","name":"Authorization","in":"header"}},"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"}}},"paths":{"/api/v2/config":{"get":{"tags":["Chat 2 Pay API"],"summary":"Get Chat 2 Pay configuration","description":"This API returns the configuration data for the configured Chat 2 Pay product.","operationId":"getConfigSettings","responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DetailedWidgetConfigResponse"}}}},"401":{"description":"Invalid Chat 2 Pay API key","content":{"*/*":{"schema":{"type":"object"}}}}}}}}}
```


---

# 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/chat-2-pay-api.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.
