citypay_api_client 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -14
  3. data/citypay_api_client.gemspec +4 -3
  4. data/docs/AirlineAdvice.md +1 -1
  5. data/docs/AuthRequest.md +3 -1
  6. data/docs/AuthResponse.md +5 -1
  7. data/docs/AuthorisationAndPaymentApi.md +300 -9
  8. data/docs/BatchProcessingApi.md +15 -11
  9. data/docs/BatchTransactionResultModel.md +5 -1
  10. data/docs/Card.md +1 -1
  11. data/docs/CardHolderAccountApi.md +64 -9
  12. data/docs/ChargeRequest.md +2 -0
  13. data/docs/ContactDetails.md +11 -11
  14. data/docs/DirectPostApi.md +40 -16
  15. data/docs/DirectPostRequest.md +3 -1
  16. data/docs/OperationalFunctionsApi.md +28 -8
  17. data/docs/PaylinkApi.md +249 -73
  18. data/docs/PaylinkCustomParam.md +3 -1
  19. data/docs/PaylinkFieldGuardModel.md +1 -1
  20. data/docs/PaylinkTokenRequestModel.md +4 -0
  21. data/docs/RegisterCard.md +1 -1
  22. data/docs/ThreeDSecure.md +1 -1
  23. data/docs/TokenisationResponseModel.md +2 -2
  24. data/docs/images/3dsv1-challenge.png +0 -0
  25. data/docs/images/3dsv2-challenge.png +0 -0
  26. data/docs/images/3dsv2-frictionless.png +0 -0
  27. data/docs/images/3dsv2-method-challenge.png +0 -0
  28. data/docs/images/3dsv2-method-frictionless.png +0 -0
  29. data/docs/images/3dsv2-no3d.png +0 -0
  30. data/docs/images/citypay-logo.svg +1 -0
  31. data/docs/images/direct-post-flow.png +0 -0
  32. data/docs/images/favicon.ico +0 -0
  33. data/docs/images/header.png +0 -0
  34. data/docs/images/logo.ai +1913 -4
  35. data/docs/images/logo.png +0 -0
  36. data/docs/images/logo.svg +1 -0
  37. data/docs/images/merchant-BPS-workflow.png +0 -0
  38. data/docs/images/paylink-field-guards.png +0 -0
  39. data/lib/.DS_Store +0 -0
  40. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
  41. data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
  42. data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
  43. data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
  44. data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
  45. data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
  46. data/lib/citypay_api_client/api_client.rb +24 -22
  47. data/lib/citypay_api_client/api_error.rb +3 -2
  48. data/lib/citypay_api_client/configuration.rb +28 -9
  49. data/lib/citypay_api_client/models/account_create.rb +17 -20
  50. data/lib/citypay_api_client/models/account_status.rb +15 -20
  51. data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
  52. data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
  53. data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
  54. data/lib/citypay_api_client/models/airline_advice.rb +45 -29
  55. data/lib/citypay_api_client/models/airline_segment.rb +35 -22
  56. data/lib/citypay_api_client/models/auth_reference.rb +41 -26
  57. data/lib/citypay_api_client/models/auth_references.rb +15 -20
  58. data/lib/citypay_api_client/models/auth_request.rb +66 -29
  59. data/lib/citypay_api_client/models/auth_response.rb +45 -22
  60. data/lib/citypay_api_client/models/authen_required.rb +15 -20
  61. data/lib/citypay_api_client/models/batch.rb +24 -21
  62. data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
  63. data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
  64. data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
  65. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
  66. data/lib/citypay_api_client/models/bin.rb +15 -20
  67. data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
  68. data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
  69. data/lib/citypay_api_client/models/capture_request.rb +27 -22
  70. data/lib/citypay_api_client/models/card.rb +33 -26
  71. data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
  72. data/lib/citypay_api_client/models/card_status.rb +15 -20
  73. data/lib/citypay_api_client/models/charge_request.rb +66 -29
  74. data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
  75. data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
  76. data/lib/citypay_api_client/models/contact_details.rb +77 -42
  77. data/lib/citypay_api_client/models/decision.rb +15 -20
  78. data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
  79. data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
  80. data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
  81. data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
  82. data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
  83. data/lib/citypay_api_client/models/error.rb +27 -24
  84. data/lib/citypay_api_client/models/event_data_model.rb +15 -20
  85. data/lib/citypay_api_client/models/exists.rb +17 -20
  86. data/lib/citypay_api_client/models/external_mpi.rb +39 -24
  87. data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
  88. data/lib/citypay_api_client/models/mcc6012.rb +15 -20
  89. data/lib/citypay_api_client/models/merchant.rb +15 -20
  90. data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
  91. data/lib/citypay_api_client/models/paylink_address.rb +52 -29
  92. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
  93. data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
  94. data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
  95. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
  96. data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
  97. data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
  98. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
  99. data/lib/citypay_api_client/models/paylink_config.rb +15 -20
  100. data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
  101. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
  102. data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
  103. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
  104. data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
  105. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
  106. data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
  107. data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
  108. data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
  109. data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
  110. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
  111. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
  112. data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
  113. data/lib/citypay_api_client/models/ping.rb +21 -22
  114. data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
  115. data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
  116. data/lib/citypay_api_client/models/refund_request.rb +28 -21
  117. data/lib/citypay_api_client/models/register_card.rb +27 -22
  118. data/lib/citypay_api_client/models/request_challenged.rb +15 -20
  119. data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
  120. data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
  121. data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
  122. data/lib/citypay_api_client/models/void_request.rb +23 -22
  123. data/lib/citypay_api_client/version.rb +3 -3
  124. data/lib/citypay_api_client.rb +2 -2
  125. data/spec/.DS_Store +0 -0
  126. data/spec/it_api_sandbox_spec.rb +5 -11
  127. data/spec/models/account_create_spec.rb +1 -2
  128. data/spec/models/account_status_spec.rb +2 -2
  129. data/spec/models/airline_advice_spec.rb +0 -2
  130. data/spec/models/airline_segment_spec.rb +0 -2
  131. data/spec/models/auth_request_spec.rb +0 -2
  132. data/spec/models/auth_response_spec.rb +75 -30
  133. data/spec/models/batch_report_request_spec.rb +0 -2
  134. data/spec/models/batch_report_response_model_spec.rb +0 -2
  135. data/spec/models/batch_spec.rb +0 -2
  136. data/spec/models/batch_transaction_result_model_spec.rb +0 -2
  137. data/spec/models/batch_transaction_spec.rb +0 -2
  138. data/spec/models/bin_lookup_spec.rb +0 -2
  139. data/spec/models/capture_request_spec.rb +0 -2
  140. data/spec/models/card_holder_account_spec.rb +0 -2
  141. data/spec/models/charge_request_spec.rb +0 -2
  142. data/spec/models/direct_post_request_spec.rb +0 -2
  143. data/spec/models/domain_key_check_request_spec.rb +0 -2
  144. data/spec/models/paylink_token_request_model_spec.rb +0 -2
  145. data/spec/models/process_batch_request_spec.rb +0 -2
  146. data/spec/models/refund_request_spec.rb +0 -2
  147. data/spec/models/register_card_spec.rb +0 -2
  148. data/spec/spec_helper.rb +2 -2
  149. metadata +25 -12
  150. data/docs/OperationalApi.md +0 -214
  151. data/docs/PaymentProcessingApi.md +0 -559
data/docs/PaylinkApi.md CHANGED
@@ -5,13 +5,13 @@ All URIs are relative to *https://api.citypay.com*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**token_adjustment_request**](PaylinkApi.md#token_adjustment_request) | **POST** /paylink/{token}/adjustment | Paylink Token Adjustment |
8
+ | [**token_changes_request**](PaylinkApi.md#token_changes_request) | **POST** /paylink/token/changes | Paylink Token Audit |
8
9
  | [**token_close_request**](PaylinkApi.md#token_close_request) | **PUT** /paylink/{token}/close | Close Paylink Token |
9
10
  | [**token_create_bill_payment_request**](PaylinkApi.md#token_create_bill_payment_request) | **POST** /paylink/bill-payment | Create Bill Payment Paylink Token |
10
11
  | [**token_create_request**](PaylinkApi.md#token_create_request) | **POST** /paylink/create | Create Paylink Token |
11
12
  | [**token_purge_attachments_request**](PaylinkApi.md#token_purge_attachments_request) | **PUT** /paylink/{token}/purge-attachments | Purges any attachments for a Paylink Token |
12
13
  | [**token_reconciled_request**](PaylinkApi.md#token_reconciled_request) | **PUT** /paylink/{token}/reconciled | Reconcile Paylink Token |
13
14
  | [**token_reopen_request**](PaylinkApi.md#token_reopen_request) | **PUT** /paylink/{token}/reopen | Reopen Paylink Token |
14
- | [**token_status_changes_request**](PaylinkApi.md#token_status_changes_request) | **POST** /paylink/token/changes | Paylink Token Audit |
15
15
  | [**token_status_request**](PaylinkApi.md#token_status_request) | **GET** /paylink/{token}/status | Paylink Token Status |
16
16
 
17
17
 
@@ -21,7 +21,11 @@ All URIs are relative to *https://api.citypay.com*
21
21
 
22
22
  Paylink Token Adjustment
23
23
 
24
- Adjusts a TokenRequest's amount value when for instance 1. a Token is created and the shopping cart is updated 2. an invoice is adjusted either due to part payment or due to increased incurred costs.
24
+ Adjusts a TokenRequest's amount value when for instance
25
+
26
+ 1. a Token is created and the shopping cart is updated
27
+ 2. an invoice is adjusted either due to part payment or due to increased incurred costs.
28
+
25
29
 
26
30
  ### Examples
27
31
 
@@ -85,13 +89,83 @@ end
85
89
  - **Accept**: application/json, text/xml
86
90
 
87
91
 
92
+ ## token_changes_request
93
+
94
+ > <PaylinkTokenStatusChangeResponse> token_changes_request(paylink_token_status_change_request)
95
+
96
+ Paylink Token Audit
97
+
98
+ Allows for the changes to a pre-existing token.
99
+
100
+ ### Examples
101
+
102
+ ```ruby
103
+ require 'time'
104
+ require 'citypay_api_client'
105
+ # setup authorization
106
+ CityPayApiClient.configure do |config|
107
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
108
+ end
109
+
110
+ api_instance = CityPayApiClient::PaylinkApi.new
111
+ paylink_token_status_change_request = CityPayApiClient::PaylinkTokenStatusChangeRequest.new({after: Time.now, merchantid: 11223344}) # PaylinkTokenStatusChangeRequest |
112
+
113
+ begin
114
+ # Paylink Token Audit
115
+ result = api_instance.token_changes_request(paylink_token_status_change_request)
116
+ p result
117
+ rescue CityPayApiClient::ApiError => e
118
+ puts "Error when calling PaylinkApi->token_changes_request: #{e}"
119
+ end
120
+ ```
121
+
122
+ #### Using the token_changes_request_with_http_info variant
123
+
124
+ This returns an Array which contains the response data, status code and headers.
125
+
126
+ > <Array(<PaylinkTokenStatusChangeResponse>, Integer, Hash)> token_changes_request_with_http_info(paylink_token_status_change_request)
127
+
128
+ ```ruby
129
+ begin
130
+ # Paylink Token Audit
131
+ data, status_code, headers = api_instance.token_changes_request_with_http_info(paylink_token_status_change_request)
132
+ p status_code # => 2xx
133
+ p headers # => { ... }
134
+ p data # => <PaylinkTokenStatusChangeResponse>
135
+ rescue CityPayApiClient::ApiError => e
136
+ puts "Error when calling PaylinkApi->token_changes_request_with_http_info: #{e}"
137
+ end
138
+ ```
139
+
140
+ ### Parameters
141
+
142
+ | Name | Type | Description | Notes |
143
+ | ---- | ---- | ----------- | ----- |
144
+ | **paylink_token_status_change_request** | [**PaylinkTokenStatusChangeRequest**](PaylinkTokenStatusChangeRequest.md) | | |
145
+
146
+ ### Return type
147
+
148
+ [**PaylinkTokenStatusChangeResponse**](PaylinkTokenStatusChangeResponse.md)
149
+
150
+ ### Authorization
151
+
152
+ [cp-api-key](../README.md#cp-api-key)
153
+
154
+ ### HTTP request headers
155
+
156
+ - **Content-Type**: application/json, text/xml
157
+ - **Accept**: application/json, text/xml
158
+
159
+
88
160
  ## token_close_request
89
161
 
90
162
  > <Acknowledgement> token_close_request(token)
91
163
 
92
164
  Close Paylink Token
93
165
 
94
- Marks a Paylink Token as closed. This closes the Token for any future action and the Token will not appear in any status request calls.
166
+ Marks a Paylink Token as closed. This closes the Token for any future action and the Token will not appear in any status
167
+ request calls.
168
+
95
169
 
96
170
  ### Examples
97
171
 
@@ -159,7 +233,177 @@ end
159
233
 
160
234
  Create Bill Payment Paylink Token
161
235
 
162
- CityPay Paylink supports invoice and bill payment services by allowing merchants to raise an invoice in their systems and associate the invoice with a Paylink checkout token. CityPay will co-ordinate the checkout flow in relationship with your customer. Our bill payment solution may be used to streamline the payment flow with cardholders to allow your invoice to be paid promptly and via multiple payment channels such as Card Payment, Apple Pay or Google Pay. The bill payment service allows 1. setting up notification paths to an end customer, such as SMS or Email 2. enabling attachments to be included with Paylink tokens 3. produce chaser notifications for unpaid invoices 4. provide callbacks for notification of the payment of an invoice 5. support part payments against an invoice 6. support of field guards to protect the payment screen 7. support of status reporting on tokens 8. URL short codes for SMS notifications <img src=\"../images/merchant-BPS-workflow.png\" alt=\"Paylink BPSv2 Overview\" width=\"50%\"/> ### Notification Paths Notification paths can be provided which identify the channels for communication of the invoice availability. Up to 3 notification paths may be provided per request. Each notification uses a template to generate the body of the message. This allows for variable text to be sent out and customised for each call. SMS messages use URL Short Codes (USC) as a payment link to the invoice payment page. This allows for a standard payment URL to be shortened for optimised usage in SMS. For instance a URL of `https://checkout.citypay.com/PL1234/s348yb8yna4a48n2f8nq2f3msgyng-psn348ynaw8ynaw/en` becomes `citypay.com/Za48na3x`. Each USC is unique however it is a requirement that each USC generated is protected with Field Guards to ensure that sensitive data (such as customer contact details and GDPR) is protected. To send a notification path, append a `notification-path` property to the request. ```json { \"sms_notification_path\": { \"to\": \"+441534884000\" }, \"email_notification_path\": { \"to\": [\"help-desk@citypay.com\"], \"cc\": [\"third-party@citypay.com\"], \"reply\": [\"help@my-company.com\"] } } ``` Notification paths trigger a number of events which are stored as part of the timeline of events of a Paylink token - `BillPaymentSmsNotificationQueued` - identifies when an SMS notification has been queued for delivery - `BillPaymentSmsNotificationSent` - identifies when an SMS notification has been sent to the upstream network - `BillPaymentSmsNotificationDelivered` - identifies when an SMS notification has been delivered as notified by the upstream network - `BillPaymentSmsNotificationUndelivered` - identifies when an SMS notification has undelivered notification is provided by the upstream network - `BillPaymentSmsNotificationFailure` - identifies when an SMS notification has failed - `BillPaymentEmailNotificationQueued` - identifies when an email notification has been queued for delivery - `BillPaymentEmailNotificationSent` - identifies when an email notification has been accepted by our SMS forwarder - `BillPaymentEmailNotificationFailure` - identifies when an email notification has failed delivery #### SMS Notification Path SMS originated from a CityPay pool of numbers and by default only sends to country codes where the service is registered. SMSs may contain a From field which is configured as part of you onboarding and have a name associated to identify the service origin. For example if your business is titled `Health Surgery Ltd` the SMS may be sent to originate from `Health Surgery`. SMS is also configured for a \"polite mode\". This mode ensures that SMSs aren't sent in the middle of the night when backend services ordinarily run. SMSs will be queued until the time range is deemed as polite. Normally this is between 8am and 9pm. | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string | Reserved | The phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format to send the message to. | #### Email Notification Paths | Field | Type | Usage | Description | |----------|----------|----------|-------------------------------------------------------------------------------------------------| | template | string | Reserved | An optional template name to use a template other than the default. | | to | string[] | Required | An array of email addresses to be used for delivery. A maximum of 5 addresses can be added. | | cc | string[] | Required | An array of email addresses to be used for cc delivery. A maximum of 5 addresses can be added. | | bcc | string[] | Required | An array of email addresses to be used for bcc delivery. A maximum of 5 addresses can be added. | | reply_to | string[] | Required | An array of email addresses to be used for the Reply-To header of an email. | ### Field Guards To ensure that invoices are paid by the intended recipient, Paylink supports the addition of Field Guards. A Field Guard is an intended field which is to be used as a form of guarded authentication. More than 1 field can be requested. <img src=\"../images/paylink-field-guards.png\" alt=\"Paylink Field Guards\" width=\"50%\"/> To determine the source value of the field, each field name is searched in the order of - identifier - cardholder data such as name - custom parameters - pass through data If no field values are found, the token request returns a D041 validation error. #### Authentication and Validation When values are entered by the user, resultant comparisons are performed by 1. Transliteration of both the source value and entered value. For example, names with accents (e.g. é will become e) 2. Only Alphanumeric values are retained any whitespace or special characters are ignored 3. Case is ignored Should all values match, the user is authenticated and can continue to the payment form rendered by the Paylink server. On successful login, an event will be added to include that the access guard validated access. #### Access-Key To ensure that a user does not need to re-enter these values multiple times, a cookie is pushed to the user’s browser with an access-key digest value. This value will be presented to the server on each refresh therefore allowing the guard to accept the call. Each value is uniquely stored per merchant account and cannot be shared cross merchant. The lifetime of the cookie is set to 24 hours. #### Brute Force Prevention To prevent multiple calls hitting the server, attempting a brute force attack, the login process 1. is fronted by a contemporary web application firewall 2. creates an event for each token when access was denied 3. should the number of failed events breach more than 5 in 30 minutes, the token is locked for an hour 4. should the number of events breach more than 20 the token is fully locked ### Attachments Attachments can be included in the request in 2 ways 1. Via a data element direct in the request 2. Via a URL upload to a provided pre-signed URL The decision of which option is dependent on the size of the attachments. Should the attachment size be greater than 32kb a URL upload is required. Small attachments can be included in the JSON request. This is to prevent our web firewall from blocking your request and to also ensure efficiency of larger file uploads. There is a maximum of 3 attachments that can be added to a request. ```json [{ \"filename\": \"invoice1.pdf\", \"mime-type\": \"application/pdf\" },{ \"filename\": \"invoice2.pdf\", \"data\": \"b4sE64Enc0dEd...=\", \"mime-type\": \"application/pdf\" }] ``` | Field | Type | Usage | Description | |-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------| | filename | string | Required | The name of the attachment normally taken from the filename. You should not include the filename path as appropriate | | data | string | Optional | base64 encoding of the file if less than 32kb in size | | mime-type | string | Required | The mime type of the attachment as defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html). Currently only `application/pdf` is supported | #### Attachment Result A result of an attachment specifies whether the attachment was successfully added or whether a further upload is requried | Field | Type | Usage | Description | |--------|--------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------| | result | string | Required | `OK` should the file have uploaded or `UPLOAD` if the file is required to be uploaded. | | name | string | Required | The filename that was specified in the upload process | | url | string | Optional | Should an upload be required, this URL is available for an upload to be issued. The URL is only available for uploads for 24 hours from creation. |
236
+ CityPay Paylink supports invoice and bill payment services by allowing merchants to raise an invoice in their systems and
237
+ associate the invoice with a Paylink checkout token. CityPay will co-ordinate the checkout flow in relationship with
238
+ your customer. Our bill payment solution may be used to streamline the payment flow with cardholders to allow your
239
+ invoice to be paid promptly and via multiple payment channels such as Card Payment, Apple Pay or Google Pay.
240
+
241
+ The bill payment service allows
242
+
243
+ 1. setting up notification paths to an end customer, such as SMS or Email
244
+ 2. enabling attachments to be included with Paylink tokens
245
+ 3. produce chaser notifications for unpaid invoices
246
+ 4. provide callbacks for notification of the payment of an invoice
247
+ 5. support part payments against an invoice
248
+ 6. support of field guards to protect the payment screen
249
+ 7. support of status reporting on tokens
250
+ 8. URL short codes for SMS notifications
251
+
252
+ <img src="images/merchant-BPS-workflow.png" alt="Paylink BPSv2 Overview" width="50%"/>
253
+
254
+
255
+ ### Notification Paths
256
+
257
+ Notification paths can be provided which identify the channels for communication of the invoice availability.
258
+ Up to 3 notification paths may be provided per request.
259
+
260
+ Each notification uses a template to generate the body of the message. This allows for variable text to be sent out and
261
+ customised for each call.
262
+
263
+ SMS messages use URL Short Codes (USC) as a payment link to the invoice payment page. This allows for a standard payment
264
+ URL to be shortened for optimised usage in SMS. For instance a URL of `https://checkout.citypay.com/PL1234/s348yb8yna4a48n2f8nq2f3msgyng-psn348ynaw8ynaw/en`
265
+ becomes `citypay.com/Za48na3x`. Each USC is unique however it is a requirement that each USC generated is protected
266
+ with Field Guards to ensure that sensitive data (such as customer contact details and GDPR) is protected.
267
+
268
+ To send a notification path, append a `notification-path` property to the request.
269
+
270
+ ```json
271
+ {
272
+ "sms_notification_path": {
273
+ "to": "+441534884000"
274
+ },
275
+ "email_notification_path": {
276
+ "to": ["help-desk@citypay.com"],
277
+ "cc": ["third-party@citypay.com"],
278
+ "reply": ["help@my-company.com"]
279
+ }
280
+ }
281
+ ```
282
+
283
+ Notification paths trigger a number of events which are stored as part of the timeline of events of a Paylink token
284
+
285
+ - `BillPaymentSmsNotificationQueued` - identifies when an SMS notification has been queued for delivery
286
+ - `BillPaymentSmsNotificationSent` - identifies when an SMS notification has been sent to the upstream network
287
+ - `BillPaymentSmsNotificationDelivered` - identifies when an SMS notification has been delivered as notified by the upstream network
288
+ - `BillPaymentSmsNotificationUndelivered` - identifies when an SMS notification has undelivered notification is provided by the upstream network
289
+ - `BillPaymentSmsNotificationFailure` - identifies when an SMS notification has failed
290
+ - `BillPaymentEmailNotificationQueued` - identifies when an email notification has been queued for delivery
291
+ - `BillPaymentEmailNotificationSent` - identifies when an email notification has been accepted by our SMS forwarder
292
+ - `BillPaymentEmailNotificationFailure` - identifies when an email notification has failed delivery
293
+
294
+
295
+ #### SMS Notification Path
296
+
297
+ SMS originated from a CityPay pool of numbers and by default only sends to country codes where the service is registered.
298
+ SMSs may contain a From field which is configured as part of you onboarding and have a name associated to identify the service
299
+ origin. For example if your business is titled `Health Surgery Ltd` the SMS may be sent to originate from `Health Surgery`.
300
+
301
+ SMS is also configured for a "polite mode". This mode ensures that SMSs aren't sent in the middle of the night when backend
302
+ services ordinarily run. SMSs will be queued until the time range is deemed as polite. Normally this is between 8am and 9pm.
303
+
304
+ | Field | Type | Usage | Description |
305
+ |----------|----------|----------|-------------------------------------------------------------------------------------------------|
306
+ | template | string | Reserved | An optional template name to use a template other than the default. |
307
+ | to | string | Reserved | The phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format to send the message to. |
308
+
309
+ #### Email Notification Paths
310
+
311
+ | Field | Type | Usage | Description |
312
+ |----------|----------|----------|-------------------------------------------------------------------------------------------------|
313
+ | template | string | Reserved | An optional template name to use a template other than the default. |
314
+ | to | string[] | Required | An array of email addresses to be used for delivery. A maximum of 5 addresses can be added. |
315
+ | cc | string[] | Required | An array of email addresses to be used for cc delivery. A maximum of 5 addresses can be added. |
316
+ | bcc | string[] | Required | An array of email addresses to be used for bcc delivery. A maximum of 5 addresses can be added. |
317
+ | reply_to | string[] | Required | An array of email addresses to be used for the Reply-To header of an email. |
318
+
319
+
320
+ ### Field Guards
321
+
322
+ To ensure that invoices are paid by the intended recipient, Paylink supports the addition of Field Guards.
323
+
324
+ A Field Guard is an intended field which is to be used as a form of guarded authentication. More than 1 field can be
325
+ requested.
326
+
327
+ <img src="images/paylink-field-guards.png" alt="Paylink Field Guards" width="50%"/>
328
+
329
+ To determine the source value of the field, each field name is searched in the order of
330
+
331
+ - identifier
332
+ - cardholder data such as name
333
+ - custom parameters
334
+ - pass through data
335
+
336
+ If no field values are found, the token request returns a D041 validation error.
337
+
338
+ #### Authentication and Validation
339
+
340
+ When values are entered by the user, resultant comparisons are performed by
341
+
342
+ 1. Transliteration of both the source value and entered value. For example, names with accents (e.g. é will become e)
343
+ 2. Only Alphanumeric values are retained any whitespace or special characters are ignored
344
+ 3. Case is ignored
345
+
346
+ Should all values match, the user is authenticated and can continue to the payment form rendered by the Paylink server.
347
+
348
+ On successful login, an event will be added to include that the access guard validated access.
349
+
350
+ #### Access-Key
351
+
352
+ To ensure that a user does not need to re-enter these values multiple times, a cookie is pushed to the user’s
353
+ browser with an access-key digest value. This value will be presented to the server on each refresh therefore
354
+ allowing the guard to accept the call. Each value is uniquely stored per merchant account and cannot be shared cross
355
+ merchant. The lifetime of the cookie is set to 24 hours.
356
+
357
+ #### Brute Force Prevention
358
+
359
+ To prevent multiple calls hitting the server, attempting a brute force attack, the login process
360
+
361
+ 1. is fronted by a contemporary web application firewall
362
+ 2. creates an event for each token when access was denied
363
+ 3. should the number of failed events breach more than 5 in 30 minutes, the token is locked for an hour
364
+ 4. should the number of events breach more than 20 the token is fully locked
365
+
366
+ ### Attachments
367
+
368
+ Attachments can be included in the request in 2 ways
369
+
370
+ 1. Via a data element direct in the request
371
+ 2. Via a URL upload to a provided pre-signed URL
372
+
373
+ The decision of which option is dependent on the size of the attachments. Should the attachment size be greater than
374
+ 32kb a URL upload is required. Small attachments can be included in the JSON request. This is to prevent our web
375
+ firewall from blocking your request and to also ensure efficiency of larger file uploads.
376
+
377
+ There is a maximum of 3 attachments that can be added to a request.
378
+
379
+ ```json
380
+ [{
381
+ "filename": "invoice1.pdf",
382
+ "mime-type": "application/pdf"
383
+ },{
384
+ "filename": "invoice2.pdf",
385
+ "data": "b4sE64Enc0dEd...=",
386
+ "mime-type": "application/pdf"
387
+ }]
388
+ ```
389
+
390
+ | Field | Type | Usage | Description |
391
+ |-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------|
392
+ | filename | string | Required | The name of the attachment normally taken from the filename. You should not include the filename path as appropriate |
393
+ | data | string | Optional | base64 encoding of the file if less than 32kb in size |
394
+ | mime-type | string | Required | The mime type of the attachment as defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html). Currently only `application/pdf` is supported |
395
+
396
+
397
+ #### Attachment Result
398
+
399
+ A result of an attachment specifies whether the attachment was successfully added or whether a further upload is requried
400
+
401
+ | Field | Type | Usage | Description |
402
+ |--------|--------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------|
403
+ | result | string | Required | `OK` should the file have uploaded or `UPLOAD` if the file is required to be uploaded. |
404
+ | name | string | Required | The filename that was specified in the upload process |
405
+ | url | string | Optional | Should an upload be required, this URL is available for an upload to be issued. The URL is only available for uploads for 24 hours from creation. |
406
+
163
407
 
164
408
  ### Examples
165
409
 
@@ -363,7 +607,7 @@ end
363
607
 
364
608
  Reconcile Paylink Token
365
609
 
366
- Marks a Paylink Token as reconciled when reconcilation is performed on the merchant's side.
610
+ Marks a Paylink Token as reconciled when reconciliation is performed on the merchant's side.
367
611
 
368
612
  ### Examples
369
613
 
@@ -493,74 +737,6 @@ end
493
737
  - **Accept**: application/json, text/xml
494
738
 
495
739
 
496
- ## token_status_changes_request
497
-
498
- > <PaylinkTokenStatusChangeResponse> token_status_changes_request(paylink_token_status_change_request)
499
-
500
- Paylink Token Audit
501
-
502
- Obtains any changes on Paylink Tokens since a given date and time. This allows for a merchant to regularly check on activity over a collection of Paylink Tokens and to check on any events that may have occurred. If a Token is `Closed` it is not considered. Only statuses that have been appended since the given date and time is returned.
503
-
504
- ### Examples
505
-
506
- ```ruby
507
- require 'time'
508
- require 'citypay_api_client'
509
- # setup authorization
510
- CityPayApiClient.configure do |config|
511
- config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
512
- end
513
-
514
- api_instance = CityPayApiClient::PaylinkApi.new
515
- paylink_token_status_change_request = CityPayApiClient::PaylinkTokenStatusChangeRequest.new({after: Time.now, merchantid: 11223344}) # PaylinkTokenStatusChangeRequest |
516
-
517
- begin
518
- # Paylink Token Audit
519
- result = api_instance.token_status_changes_request(paylink_token_status_change_request)
520
- p result
521
- rescue CityPayApiClient::ApiError => e
522
- puts "Error when calling PaylinkApi->token_status_changes_request: #{e}"
523
- end
524
- ```
525
-
526
- #### Using the token_status_changes_request_with_http_info variant
527
-
528
- This returns an Array which contains the response data, status code and headers.
529
-
530
- > <Array(<PaylinkTokenStatusChangeResponse>, Integer, Hash)> token_status_changes_request_with_http_info(paylink_token_status_change_request)
531
-
532
- ```ruby
533
- begin
534
- # Paylink Token Audit
535
- data, status_code, headers = api_instance.token_status_changes_request_with_http_info(paylink_token_status_change_request)
536
- p status_code # => 2xx
537
- p headers # => { ... }
538
- p data # => <PaylinkTokenStatusChangeResponse>
539
- rescue CityPayApiClient::ApiError => e
540
- puts "Error when calling PaylinkApi->token_status_changes_request_with_http_info: #{e}"
541
- end
542
- ```
543
-
544
- ### Parameters
545
-
546
- | Name | Type | Description | Notes |
547
- | ---- | ---- | ----------- | ----- |
548
- | **paylink_token_status_change_request** | [**PaylinkTokenStatusChangeRequest**](PaylinkTokenStatusChangeRequest.md) | | |
549
-
550
- ### Return type
551
-
552
- [**PaylinkTokenStatusChangeResponse**](PaylinkTokenStatusChangeResponse.md)
553
-
554
- ### Authorization
555
-
556
- [cp-api-key](../README.md#cp-api-key)
557
-
558
- ### HTTP request headers
559
-
560
- - **Content-Type**: application/json, text/xml
561
- - **Accept**: application/json, text/xml
562
-
563
-
564
740
  ## token_status_request
565
741
 
566
742
  > <PaylinkTokenStatus> token_status_request(token)
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **field_type** | **String** | the type of html5 field, defaults to &#39;text&#39;. | [optional] |
7
+ | **entry_mode** | **String** | The type of entry mode. A value of &#39;pre&#39; will pre-render the custom parameter before the payment screen. Any other value will result in the custom parameter being displayed on the payment screen. | [optional] |
8
+ | **field_type** | **String** | the type of html5 field, defaults to &#39;text&#39;. Other options are &#39;dob&#39; for a date of birth series of select list entry. | [optional] |
8
9
  | **group** | **String** | a group the parameter is linked with, allows for grouping with a title. | [optional] |
9
10
  | **label** | **String** | a label to show alongside the input. | [optional] |
10
11
  | **locked** | **Boolean** | whether the parameter is locked from entry. | [optional] |
@@ -21,6 +22,7 @@
21
22
  require 'citypay_api_client'
22
23
 
23
24
  instance = CityPayApiClient::PaylinkCustomParam.new(
25
+ entry_mode: null,
24
26
  field_type: null,
25
27
  group: null,
26
28
  label: null,
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **field_type** | **String** | A type of HTML element that should be displayed such as text, password, url. Any HTML5 input type value may be supplied. | [optional] |
7
+ | **field_type** | **String** | A type of HTML element that should be displayed such as text, password, url. Any HTML5 input type value may be supplied. If a value of &#x60;date&#x60; is supplied the value format should be an ISO format YYYY-MM-DD format date i.e. 2024-03-01 If a value of &#x60;datetime-local&#x60; is supplied, the value format should be an ISO format YYYY-MM-DDTHH:mm i.e. 2024-06-01T19:30. | [optional] |
8
8
  | **label** | **String** | A label for the field guard to display on the authentication page. | [optional] |
9
9
  | **maxlen** | **Integer** | A maximum length of any value supplied in the field guard form. Used for validating entry. | [optional] |
10
10
  | **minlen** | **Integer** | A minimum length of any value supplied in the field guard form. Used for validating entry. | [optional] |
@@ -10,9 +10,11 @@
10
10
  | **cart** | [**PaylinkCart**](PaylinkCart.md) | | [optional] |
11
11
  | **client_version** | **String** | The clientVersion field is used to specify the version of your application that has invoked the Paylink payment process. This feature is typically used for tracing issues relating to application deployments, or any Paylink integration module or plugin. | [optional] |
12
12
  | **config** | [**PaylinkConfig**](PaylinkConfig.md) | | [optional] |
13
+ | **currency** | **String** | A currency for the token. This value should be only used on multi-currency accounts and be an appropriate currency which the account is configured for. | [optional] |
13
14
  | **email** | **String** | The email field is used for the Merchant to be notified on completion of the transaction . The value may be supplied to override the default stored value. Emails sent to this address by the Paylink service should not be forwarded on to the cardholder as it may contain certain information that is used by the Paylink service to validate and authenticate Paylink Token Requests: for example, the Merchant ID and the licence key. | [optional] |
14
15
  | **identifier** | **String** | Identifies a particular transaction linked to a Merchant account. It enables accurate duplicate checking within a pre-configured time period, as well as transaction reporting and tracing. The identifier should be unique to prevent payment card processing attempts from being rejected due to duplication. | |
15
16
  | **merchantid** | **Integer** | The merchant id you wish to process this transaction with. | |
17
+ | **recurring** | **Boolean** | True if the intent of this cardholder initiated transaction is to establish a recurring payment model, processable as merchant initiated transactions. | [optional] |
16
18
  | **subscription_id** | **String** | an id associated with a subscription to link the token request against. | [optional] |
17
19
  | **tx_type** | **String** | A value to override the transaction type if requested by your account manager. | [optional] |
18
20
 
@@ -28,9 +30,11 @@ instance = CityPayApiClient::PaylinkTokenRequestModel.new(
28
30
  cart: null,
29
31
  client_version: null,
30
32
  config: null,
33
+ currency: GBP,
31
34
  email: card.holder@citypay.com,
32
35
  identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
33
36
  merchantid: 11223344,
37
+ recurring: null,
34
38
  subscription_id: null,
35
39
  tx_type: null
36
40
  )
data/docs/RegisterCard.md CHANGED
@@ -19,7 +19,7 @@ instance = CityPayApiClient::RegisterCard.new(
19
19
  cardnumber: 4000 0000 0000 0002,
20
20
  default: null,
21
21
  expmonth: 9,
22
- expyear: 2025,
22
+ expyear: 2027,
23
23
  name_on_card: MR NE BODY
24
24
  )
25
25
  ```
data/docs/ThreeDSecure.md CHANGED
@@ -11,7 +11,7 @@
11
11
  | **browser_language** | **String** | BrowserLanguage field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the &#x60;bx&#x60; function to gather this value. | [optional] |
12
12
  | **browser_screen_height** | **String** | BrowserScreenHeight field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the &#x60;bx&#x60; function to gather this value. | [optional] |
13
13
  | **browser_screen_width** | **String** | BrowserScreenWidth field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the &#x60;bx&#x60; function to gather this value. | [optional] |
14
- | **browser_tz** | **String** | BrowserTZ field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the &#x60;bx&#x60; function to gather this value. | [optional] |
14
+ | **browser_tz** | **String** | BrowserTZ offset field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the &#x60;bx&#x60; function to gather this value. | [optional] |
15
15
  | **cp_bx** | **String** | Required for 3DSv2. Browser extension value produced by the citypay.js &#x60;bx&#x60; function. See [https://sandbox.citypay.com/3dsv2/bx](https://sandbox.citypay.com/3dsv2/bx) for details. | [optional] |
16
16
  | **downgrade1** | **Boolean** | Where a merchant is configured for 3DSv2, setting this option will attempt to downgrade the transaction to 3DSv1. | [optional] |
17
17
  | **merchant_termurl** | **String** | A controller URL for 3D-Secure processing that any response from an authentication request or challenge request should be sent to. The controller should forward on the response from the URL back via this API for subsequent processing. | [optional] |
@@ -11,9 +11,9 @@
11
11
  | **eci** | **String** | An Electronic Commerce Indicator (ECI) used to identify the result of authentication using 3DSecure. | [optional] |
12
12
  | **identifier** | **String** | The identifier provided within the request. | [optional] |
13
13
  | **maskedpan** | **String** | A masked value of the card number used for processing displaying limited values that can be used on a receipt. | [optional] |
14
- | **scheme** | **String** | A name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard. | [optional] |
14
+ | **scheme** | **String** | The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard. | [optional] |
15
15
  | **sig_id** | **String** | A Base58 encoded SHA-256 digest generated from the token value Base58 decoded and appended with the nonce value UTF-8 decoded. | [optional] |
16
- | **token** | **String** | The token used for presentment to authorisation later in the procsesing flow. | [optional] |
16
+ | **token** | **String** | The token used for presentment to authorisation later in the processing flow. | [optional] |
17
17
 
18
18
  ## Example
19
19
 
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 520.89 113.5"><defs><style>.cls-1{fill:#003b71;}.cls-2{fill:#d7c724;}</style></defs><title>citypay-logo</title><g id="Layer_2" data-name="Layer 2"><g id="Standard"><path class="cls-1" d="M139,27a45.23,45.23,0,0,1,18.67,4L156.33,44.7a39.52,39.52,0,0,0-15.57-3.22c-10.82,0-19.11,5.56-19.11,16.26,0,10.14,7.85,16.44,18.61,16.44a37.32,37.32,0,0,0,16.32-3.89l1.86,14.09a44.68,44.68,0,0,1-19.23,4.39c-19.54,0-33.44-12.61-33.44-31C105.77,38.51,119.86,27,139,27Z"/><path class="cls-2" d="M168.15,9.15a9.12,9.12,0,1,1,18.24,0,9.12,9.12,0,0,1-18.24,0Z"/><rect class="cls-1" x="169.33" y="28.19" width="15.89" height="59.35"/><path class="cls-1" d="M220.58,41.36V65.78c0,6.18,3.46,8.9,8.78,8.9a40.29,40.29,0,0,0,10.07-1.42l1.49,13.16a44.2,44.2,0,0,1-14.35,2.35c-13,0-21.82-6.74-21.82-20.71V41.36h-10V28.19h10.07v-19h15.4v19h17.18V41.36Z"/><path class="cls-1" d="M292.17,28.19h17.62l-28,67.45C277,107,269.73,113.5,257,113.5a25.67,25.67,0,0,1-11.32-2.6l2-12.73a20,20,0,0,0,7.48,1.55c6.62,0,11.32-4.64,13.17-12.12L243.77,28.19h17.55L276.84,71.4Z"/><path class="cls-1" d="M378,58.11c0,17.93-11.93,30.66-28.74,30.66-8.72,0-15.33-3-19.29-7.48v31H314.13V28.19H329.4l.31,7.17c3.9-4.94,10-8.41,19.54-8.41C366.06,27,378,40.06,378,58.11ZM346,74.55c9.4,0,16.08-7.1,16.08-16.5,0-9.58-6.62-16.88-16.08-16.88S329.9,48.59,329.9,58.05,336.7,74.55,346,74.55Z"/><path class="cls-1" d="M384.35,57.74c0-18,12.3-30.79,28.62-30.79,9.21,0,15.45,3.53,19.35,8.41l.31-7.17h15.51V87.54H432.63l-.31-7.17c-3.9,4.94-10.14,8.4-19.35,8.4C396.65,88.77,384.35,75.73,384.35,57.74Zm31.71-16.63c-9.52,0-15.95,7.17-15.95,16.63s6.43,16.94,15.95,16.94,16.2-7.42,16.2-16.94S425.52,41.11,416.06,41.11Z"/><path class="cls-1" d="M503.27,28.19h17.62l-28,67.45c-4.76,11.37-12.05,17.86-24.79,17.86a25.62,25.62,0,0,1-11.31-2.6l2-12.73a20,20,0,0,0,7.48,1.55c6.61,0,11.31-4.64,13.17-12.12L454.86,28.19h17.56L487.94,71.4Z"/><path class="cls-2" d="M51.29,80l1.32-.26a30.92,30.92,0,0,0,0-60.65l-1.32-.27v-16l1.87.27A46.84,46.84,0,0,1,93.53,49.4a46.37,46.37,0,0,1-8.21,26.41A47.05,47.05,0,0,1,64.79,92.52L54.33,108.71l-3,4.79Z"/><path class="cls-1" d="M40.28,95.68C17.31,92.3,0,72.41,0,49.4A47.13,47.13,0,0,1,40.16,3.13l2.28-.25v16l-1.63.25a30.87,30.87,0,0,0-.07,60.57l1.7.24v16Z"/><path class="cls-1" d="M46.55,69.05C35.24,69.05,26,60.27,26,49.47S35.24,29.9,46.55,29.9s20.52,8.78,20.52,19.57S57.87,69.05,46.55,69.05Z"/></g></g></svg>
Binary file
Binary file
Binary file