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.
- checksums.yaml +4 -4
- data/README.md +15 -14
- data/citypay_api_client.gemspec +4 -3
- data/docs/AirlineAdvice.md +1 -1
- data/docs/AuthRequest.md +3 -1
- data/docs/AuthResponse.md +5 -1
- data/docs/AuthorisationAndPaymentApi.md +300 -9
- data/docs/BatchProcessingApi.md +15 -11
- data/docs/BatchTransactionResultModel.md +5 -1
- data/docs/Card.md +1 -1
- data/docs/CardHolderAccountApi.md +64 -9
- data/docs/ChargeRequest.md +2 -0
- data/docs/ContactDetails.md +11 -11
- data/docs/DirectPostApi.md +40 -16
- data/docs/DirectPostRequest.md +3 -1
- data/docs/OperationalFunctionsApi.md +28 -8
- data/docs/PaylinkApi.md +249 -73
- data/docs/PaylinkCustomParam.md +3 -1
- data/docs/PaylinkFieldGuardModel.md +1 -1
- data/docs/PaylinkTokenRequestModel.md +4 -0
- data/docs/RegisterCard.md +1 -1
- data/docs/ThreeDSecure.md +1 -1
- data/docs/TokenisationResponseModel.md +2 -2
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
- data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
- data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
- data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
- data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
- data/lib/citypay_api_client/api_client.rb +24 -22
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +28 -9
- data/lib/citypay_api_client/models/account_create.rb +17 -20
- data/lib/citypay_api_client/models/account_status.rb +15 -20
- data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
- data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
- data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
- data/lib/citypay_api_client/models/airline_advice.rb +45 -29
- data/lib/citypay_api_client/models/airline_segment.rb +35 -22
- data/lib/citypay_api_client/models/auth_reference.rb +41 -26
- data/lib/citypay_api_client/models/auth_references.rb +15 -20
- data/lib/citypay_api_client/models/auth_request.rb +66 -29
- data/lib/citypay_api_client/models/auth_response.rb +45 -22
- data/lib/citypay_api_client/models/authen_required.rb +15 -20
- data/lib/citypay_api_client/models/batch.rb +24 -21
- data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
- data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
- data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
- data/lib/citypay_api_client/models/bin.rb +15 -20
- data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
- data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/capture_request.rb +27 -22
- data/lib/citypay_api_client/models/card.rb +33 -26
- data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
- data/lib/citypay_api_client/models/card_status.rb +15 -20
- data/lib/citypay_api_client/models/charge_request.rb +66 -29
- data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
- data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
- data/lib/citypay_api_client/models/contact_details.rb +77 -42
- data/lib/citypay_api_client/models/decision.rb +15 -20
- data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
- data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
- data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
- data/lib/citypay_api_client/models/error.rb +27 -24
- data/lib/citypay_api_client/models/event_data_model.rb +15 -20
- data/lib/citypay_api_client/models/exists.rb +17 -20
- data/lib/citypay_api_client/models/external_mpi.rb +39 -24
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
- data/lib/citypay_api_client/models/mcc6012.rb +15 -20
- data/lib/citypay_api_client/models/merchant.rb +15 -20
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_address.rb +52 -29
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
- data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
- data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
- data/lib/citypay_api_client/models/paylink_config.rb +15 -20
- data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
- data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
- data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
- data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
- data/lib/citypay_api_client/models/ping.rb +21 -22
- data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
- data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
- data/lib/citypay_api_client/models/refund_request.rb +28 -21
- data/lib/citypay_api_client/models/register_card.rb +27 -22
- data/lib/citypay_api_client/models/request_challenged.rb +15 -20
- data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
- data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
- data/lib/citypay_api_client/models/void_request.rb +23 -22
- data/lib/citypay_api_client/version.rb +3 -3
- data/lib/citypay_api_client.rb +2 -2
- data/spec/.DS_Store +0 -0
- data/spec/it_api_sandbox_spec.rb +5 -11
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +75 -30
- data/spec/models/batch_report_request_spec.rb +0 -2
- data/spec/models/batch_report_response_model_spec.rb +0 -2
- data/spec/models/batch_spec.rb +0 -2
- data/spec/models/batch_transaction_result_model_spec.rb +0 -2
- data/spec/models/batch_transaction_spec.rb +0 -2
- data/spec/models/bin_lookup_spec.rb +0 -2
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +0 -2
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/direct_post_request_spec.rb +0 -2
- data/spec/models/domain_key_check_request_spec.rb +0 -2
- data/spec/models/paylink_token_request_model_spec.rb +0 -2
- data/spec/models/process_batch_request_spec.rb +0 -2
- data/spec/models/refund_request_spec.rb +0 -2
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/spec_helper.rb +2 -2
- metadata +25 -12
- data/docs/OperationalApi.md +0 -214
- data/docs/PaymentProcessingApi.md +0 -559
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffc51d5a014c59fc14c213cd2f0340323c31e8094fc8602fc27e357675e5fe0d
|
4
|
+
data.tar.gz: 4584d27c08da5b4aa0742ba6177dcbaa0ff1e6822481461056aa721be5b12de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d9330bc04c09a6ab2b5346db177aa58a13ec7357841fa718c4ad4df9371bf51aa730d6d064ae497e8a1e75268b3fab16bf979334589e1549ec3fcfbce8ffb4f
|
7
|
+
data.tar.gz: 3c9b157bd6def911f761a3964abe6ff459ab297451c9e120e3ad40ae28d519bf48af0b98a05dc92199127afcabc81e0a8ed22d6842b5718a8a360359789d557a
|
data/README.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# CityPay API Client for Ruby
|
2
2
|
|
3
3
|
CityPayApiClient - the Ruby gem for the CityPay Payment API
|
4
|
-
[](https://github.com/citypay/citypay-api-client-ruby/actions/workflows/build.yml)
|
5
5
|
|
6
6
|
|
7
|
-
This CityPay API is
|
7
|
+
This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It
|
8
8
|
provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing,
|
9
9
|
3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and
|
10
|
-
Completion processing. The API is also capable of
|
10
|
+
Completion processing. The API is also capable of tokenized payments using cardholder Accounts.
|
11
11
|
|
12
12
|
## Compliance and Security
|
13
13
|
Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by
|
14
14
|
Visa and MasterCard and the PCI Security Standards Council. These include
|
15
15
|
|
16
|
-
* Data must be collected using TLS version 1.2 using [strong cryptography](
|
16
|
+
* Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at
|
17
17
|
lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments
|
18
18
|
as part of our compliance program.
|
19
|
-
* The application must not store sensitive
|
19
|
+
* The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or
|
20
20
|
primary access number (PAN)
|
21
21
|
* The application must not display the full card number on receipts, it is recommended to mask the PAN
|
22
22
|
and show the last 4 digits. The API will return this for you for ease of receipt creation
|
@@ -31,10 +31,10 @@ Visa and MasterCard and the PCI Security Standards Council. These include
|
|
31
31
|
|
32
32
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
33
33
|
|
34
|
-
- API version: 6.
|
35
|
-
- Package version: 1.1.
|
34
|
+
- API version: 6.6.23
|
35
|
+
- Package version: 1.1.2
|
36
36
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
37
|
-
For more information, please visit [https://citypay.com/
|
37
|
+
For more information, please visit [https://www.citypay.com/contacts/](https://www.citypay.com/contacts/)
|
38
38
|
|
39
39
|
## Installation
|
40
40
|
|
@@ -49,16 +49,16 @@ gem build citypay_api_client.gemspec
|
|
49
49
|
Then either install the gem locally:
|
50
50
|
|
51
51
|
```shell
|
52
|
-
gem install ./citypay_api_client-1.1.
|
52
|
+
gem install ./citypay_api_client-1.1.2.gem
|
53
53
|
```
|
54
54
|
|
55
|
-
(for development, run `gem install --dev ./citypay_api_client-1.1.
|
55
|
+
(for development, run `gem install --dev ./citypay_api_client-1.1.2.gem` to install the development dependencies)
|
56
56
|
|
57
57
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
58
58
|
|
59
59
|
Finally add this to the Gemfile:
|
60
60
|
|
61
|
-
gem 'citypay_api_client', '~> 1.1.
|
61
|
+
gem 'citypay_api_client', '~> 1.1.2'
|
62
62
|
|
63
63
|
### Install from Git
|
64
64
|
|
@@ -88,7 +88,7 @@ CityPayApiClient.configure do |config|
|
|
88
88
|
end
|
89
89
|
|
90
90
|
api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
|
91
|
-
auth_request = CityPayApiClient::AuthRequest.new({amount: 3600, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear:
|
91
|
+
auth_request = CityPayApiClient::AuthRequest.new({amount: 3600, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear: 2027, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344}) # AuthRequest |
|
92
92
|
|
93
93
|
begin
|
94
94
|
#Authorisation
|
@@ -115,7 +115,7 @@ Class | Method | HTTP request | Description
|
|
115
115
|
*CityPayApiClient::AuthorisationAndPaymentApi* | [**retrieval_request**](docs/AuthorisationAndPaymentApi.md#retrieval_request) | **POST** /v6/retrieve | Retrieval
|
116
116
|
*CityPayApiClient::AuthorisationAndPaymentApi* | [**void_request**](docs/AuthorisationAndPaymentApi.md#void_request) | **POST** /v6/void | Void
|
117
117
|
*CityPayApiClient::BatchProcessingApi* | [**batch_process_request**](docs/BatchProcessingApi.md#batch_process_request) | **POST** /v6/batch/process | Batch Process Request
|
118
|
-
*CityPayApiClient::BatchProcessingApi* | [**
|
118
|
+
*CityPayApiClient::BatchProcessingApi* | [**batch_retrieve_request**](docs/BatchProcessingApi.md#batch_retrieve_request) | **POST** /v6/batch/retrieve | BatchReportRequest
|
119
119
|
*CityPayApiClient::BatchProcessingApi* | [**check_batch_status_request**](docs/BatchProcessingApi.md#check_batch_status_request) | **POST** /v6/batch/status | CheckBatchStatus
|
120
120
|
*CityPayApiClient::CardHolderAccountApi* | [**account_card_delete_request**](docs/CardHolderAccountApi.md#account_card_delete_request) | **DELETE** /v6/account/{accountid}/card/{cardId} | Card Deletion
|
121
121
|
*CityPayApiClient::CardHolderAccountApi* | [**account_card_register_request**](docs/CardHolderAccountApi.md#account_card_register_request) | **POST** /v6/account/{accountid}/register | Card Registration
|
@@ -138,13 +138,13 @@ Class | Method | HTTP request | Description
|
|
138
138
|
*CityPayApiClient::OperationalFunctionsApi* | [**list_merchants_request**](docs/OperationalFunctionsApi.md#list_merchants_request) | **GET** /v6/merchants/{clientid} | List Merchants Request
|
139
139
|
*CityPayApiClient::OperationalFunctionsApi* | [**ping_request**](docs/OperationalFunctionsApi.md#ping_request) | **POST** /v6/ping | Ping Request
|
140
140
|
*CityPayApiClient::PaylinkApi* | [**token_adjustment_request**](docs/PaylinkApi.md#token_adjustment_request) | **POST** /paylink/{token}/adjustment | Paylink Token Adjustment
|
141
|
+
*CityPayApiClient::PaylinkApi* | [**token_changes_request**](docs/PaylinkApi.md#token_changes_request) | **POST** /paylink/token/changes | Paylink Token Audit
|
141
142
|
*CityPayApiClient::PaylinkApi* | [**token_close_request**](docs/PaylinkApi.md#token_close_request) | **PUT** /paylink/{token}/close | Close Paylink Token
|
142
143
|
*CityPayApiClient::PaylinkApi* | [**token_create_bill_payment_request**](docs/PaylinkApi.md#token_create_bill_payment_request) | **POST** /paylink/bill-payment | Create Bill Payment Paylink Token
|
143
144
|
*CityPayApiClient::PaylinkApi* | [**token_create_request**](docs/PaylinkApi.md#token_create_request) | **POST** /paylink/create | Create Paylink Token
|
144
145
|
*CityPayApiClient::PaylinkApi* | [**token_purge_attachments_request**](docs/PaylinkApi.md#token_purge_attachments_request) | **PUT** /paylink/{token}/purge-attachments | Purges any attachments for a Paylink Token
|
145
146
|
*CityPayApiClient::PaylinkApi* | [**token_reconciled_request**](docs/PaylinkApi.md#token_reconciled_request) | **PUT** /paylink/{token}/reconciled | Reconcile Paylink Token
|
146
147
|
*CityPayApiClient::PaylinkApi* | [**token_reopen_request**](docs/PaylinkApi.md#token_reopen_request) | **PUT** /paylink/{token}/reopen | Reopen Paylink Token
|
147
|
-
*CityPayApiClient::PaylinkApi* | [**token_status_changes_request**](docs/PaylinkApi.md#token_status_changes_request) | **POST** /paylink/token/changes | Paylink Token Audit
|
148
148
|
*CityPayApiClient::PaylinkApi* | [**token_status_request**](docs/PaylinkApi.md#token_status_request) | **GET** /paylink/{token}/status | Paylink Token Status
|
149
149
|
|
150
150
|
|
@@ -229,6 +229,7 @@ Class | Method | HTTP request | Description
|
|
229
229
|
## Documentation for Authorization
|
230
230
|
|
231
231
|
|
232
|
+
Authentication schemes defined for the API:
|
232
233
|
### cp-api-key
|
233
234
|
|
234
235
|
|
data/citypay_api_client.gemspec
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
=begin
|
4
4
|
#CityPay Payment API
|
5
5
|
|
6
|
-
# This CityPay API is
|
6
|
+
# This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
7
7
|
|
8
8
|
Contact: support@citypay.com
|
9
9
|
Generated by: https://openapi-generator.tech
|
10
|
-
OpenAPI Generator version:
|
10
|
+
OpenAPI Generator version: 7.2.0
|
11
11
|
|
12
12
|
=end
|
13
13
|
|
@@ -24,7 +24,8 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.summary = "A ruby wrapper for the CityPay API"
|
25
25
|
s.description = "CityPay API Client for Ruby"
|
26
26
|
s.license = "Unlicense"
|
27
|
-
s.required_ruby_version = ">= 2.
|
27
|
+
s.required_ruby_version = ">= 2.7"
|
28
|
+
s.metadata = {}
|
28
29
|
|
29
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
30
31
|
|
data/docs/AirlineAdvice.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
| **conjunction_ticket_indicator** | **Boolean** | true if a conjunction ticket (with additional coupons) was issued for an itinerary with more than four segments. Defaults to false. | [optional] |
|
9
9
|
| **eticket_indicator** | **Boolean** | The Electronic Ticket Indicator, a code that indicates if an electronic ticket was issued. Defaults to true. | [optional] |
|
10
10
|
| **no_air_segments** | **Integer** | A value that indicates the number of air travel segments included on this ticket. Valid entries include the numerals “0” through “4”. Required only if the transaction type is TKT or EXC. | [optional] |
|
11
|
-
| **number_in_party** | **Integer** | The number of people in the party. |
|
11
|
+
| **number_in_party** | **Integer** | The number of people in the party. | [optional] |
|
12
12
|
| **original_ticket_no** | **String** | Required if transaction type is EXC. | [optional] |
|
13
13
|
| **passenger_name** | **String** | The name of the passenger when the traveller is not the card member that purchased the ticket. Required only if the transaction type is TKT or EXC. | [optional] |
|
14
14
|
| **segment1** | [**AirlineSegment**](AirlineSegment.md) | | |
|
data/docs/AuthRequest.md
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
| **merchantid** | **Integer** | Identifies the merchant account to perform processing for. | |
|
24
24
|
| **name_on_card** | **String** | The card holder name as appears on the card such as MR N E BODY. Required for some acquirers. | [optional] |
|
25
25
|
| **ship_to** | [**ContactDetails**](ContactDetails.md) | | [optional] |
|
26
|
+
| **tag** | **String** | A \"tag\" is a label that you can attach to a payment authorization. Tags can help you group transactions together based on certain criteria, like a work job or a ticket number. They can also assist in filtering transactions when you're generating reports. Multiple Tags You can add more than one tag to a transaction by separating them with commas. Limitations There is a maximum limit of 3 tags that can be added to a single transaction. Each tag can be no longer than 20 characters and alphanumeric with no spaces. Example: Let's say you're a software company and you have different teams working on various projects. When a team makes a purchase or incurs an expense, they can tag the transaction with the project name, the team name, and the type of expense. Project Name: Project_X Team Name: Team_A Type of Expense: Hardware So, the tag for a transaction might look like: Project_X,Team_A,Hardware This way, when you're looking at your financial reports, you can easily filter transactions based on these tags to see how much each project or team is spending on different types of expenses. | [optional] |
|
26
27
|
| **threedsecure** | [**ThreeDSecure**](ThreeDSecure.md) | | [optional] |
|
27
28
|
| **trans_info** | **String** | Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id. | [optional] |
|
28
29
|
| **trans_type** | **String** | The type of transaction being submitted. Normally this value is not required and your account manager may request that you set this field. | [optional] |
|
@@ -44,7 +45,7 @@ instance = CityPayApiClient::AuthRequest.new(
|
|
44
45
|
duplicate_policy: null,
|
45
46
|
event_management: null,
|
46
47
|
expmonth: 9,
|
47
|
-
expyear:
|
48
|
+
expyear: 2027,
|
48
49
|
external_mpi: null,
|
49
50
|
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
50
51
|
match_avsa: null,
|
@@ -52,6 +53,7 @@ instance = CityPayApiClient::AuthRequest.new(
|
|
52
53
|
merchantid: 11223344,
|
53
54
|
name_on_card: MR NE BODY,
|
54
55
|
ship_to: null,
|
56
|
+
tag: null,
|
55
57
|
threedsecure: null,
|
56
58
|
trans_info: null,
|
57
59
|
trans_type: null
|
data/docs/AuthResponse.md
CHANGED
@@ -27,7 +27,9 @@
|
|
27
27
|
| **result** | **Integer** | An integer result that indicates the outcome of the transaction. The Code value below maps to the result value <table> <tr> <th>Code</th> <th>Abbrev</th> <th>Description</th> </tr> <tr><td>0</td><td>Declined</td><td>Declined</td></tr> <tr><td>1</td><td>Accepted</td><td>Accepted</td></tr> <tr><td>2</td><td>Rejected</td><td>Rejected</td></tr> <tr><td>3</td><td>Not Attempted</td><td>Not Attempted</td></tr> <tr><td>4</td><td>Referred</td><td>Referred</td></tr> <tr><td>5</td><td>PinRetry</td><td>Perform PIN Retry</td></tr> <tr><td>6</td><td>ForSigVer</td><td>Force Signature Verification</td></tr> <tr><td>7</td><td>Hold</td><td>Hold</td></tr> <tr><td>8</td><td>SecErr</td><td>Security Error</td></tr> <tr><td>9</td><td>CallAcq</td><td>Call Acquirer</td></tr> <tr><td>10</td><td>DNH</td><td>Do Not Honour</td></tr> <tr><td>11</td><td>RtnCrd</td><td>Retain Card</td></tr> <tr><td>12</td><td>ExprdCrd</td><td>Expired Card</td></tr> <tr><td>13</td><td>InvldCrd</td><td>Invalid Card No</td></tr> <tr><td>14</td><td>PinExcd</td><td>Pin Tries Exceeded</td></tr> <tr><td>15</td><td>PinInvld</td><td>Pin Invalid</td></tr> <tr><td>16</td><td>AuthReq</td><td>Authentication Required</td></tr> <tr><td>17</td><td>AuthenFail</td><td>Authentication Failed</td></tr> <tr><td>18</td><td>Verified</td><td>Card Verified</td></tr> <tr><td>19</td><td>Cancelled</td><td>Cancelled</td></tr> <tr><td>20</td><td>Un</td><td>Unknown</td></tr> <tr><td>21</td><td>Challenged</td><td>Challenged</td></tr> <tr><td>22</td><td>Decoupled</td><td>Decoupled</td></tr> <tr><td>23</td><td>Denied</td><td>Permission Denied</td></tr> </table> | |
|
28
28
|
| **result_code** | **String** | The result code as defined in the Response Codes Reference for example 000 is an accepted live transaction whilst 001 is an accepted test transaction. Result codes identify the source of success and failure. Codes may start with an alpha character i.e. C001 indicating a type of error such as a card validation error. | |
|
29
29
|
| **result_message** | **String** | The message regarding the result which provides further narrative to the result code. | |
|
30
|
-
| **scheme** | **String** |
|
30
|
+
| **scheme** | **String** | The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard. | [optional] |
|
31
|
+
| **scheme_id** | **String** | The name of the card scheme of the transaction such as VI or MC. | [optional] |
|
32
|
+
| **scheme_logo** | **String** | A url containing a logo of the card scheme. | [optional] |
|
31
33
|
| **sha256** | **String** | A SHA256 digest value of the transaction used to validate the response data The digest is calculated by concatenating * authcode * amount * response_code * merchant_id * trans_no * identifier * licence_key - which is not provided in the response. | [optional] |
|
32
34
|
| **trans_status** | **String** | Used to identify the status of a transaction. The status is used to track a transaction through its life cycle. <table> <tr> <th>Id</th> <th>Description</th> </tr> <tr> <td>O</td> <td>Transaction is open for settlement</td> </tr> <tr> <td>A</td> <td>Transaction is assigned for settlement and can no longer be voided</td> </tr> <tr> <td>S</td> <td>Transaction has been settled</td> </tr> <tr> <td>D</td> <td>Transaction has been declined</td> </tr> <tr> <td>R</td> <td>Transaction has been rejected</td> </tr> <tr> <td>P</td> <td>Transaction has been authorised only and awaiting a capture. Used in pre-auth situations</td> </tr> <tr> <td>C</td> <td>Transaction has been cancelled</td> </tr> <tr> <td>E</td> <td>Transaction has expired</td> </tr> <tr> <td>I</td> <td>Transaction has been initialised but no action was able to be carried out</td> </tr> <tr> <td>H</td> <td>Transaction is awaiting authorisation</td> </tr> <tr> <td>.</td> <td>Transaction is on hold</td> </tr> <tr> <td>V</td> <td>Transaction has been verified</td> </tr> </table> | [optional] |
|
33
35
|
| **transno** | **Integer** | The resulting transaction number, ordered incrementally from 1 for every merchant_id. The value will default to less than 1 for transactions that do not have a transaction number issued. | [optional] |
|
@@ -62,6 +64,8 @@ instance = CityPayApiClient::AuthResponse.new(
|
|
62
64
|
result_code: 0,
|
63
65
|
result_message: Accepted Transaction,
|
64
66
|
scheme: Visa,
|
67
|
+
scheme_id: MC,
|
68
|
+
scheme_logo: https://cdn.citypay.com/img/cs/visa-logo.svg,
|
65
69
|
sha256: null,
|
66
70
|
trans_status: null,
|
67
71
|
transno: 78416
|
@@ -20,7 +20,235 @@ All URIs are relative to *https://api.citypay.com*
|
|
20
20
|
|
21
21
|
Authorisation
|
22
22
|
|
23
|
-
An authorisation process performs a standard transaction authorisation based on the provided parameters of its request. The CityPay gateway will route your transaction via an Acquiring bank for subsequent authorisation to the appropriate card schemes such as Visa or MasterCard. The authorisation API should be used for server environments to process transactions on demand and in realtime. The authorisation API can be used for multiple types of transactions including E-commerce, mail order, telephone order, customer present (keyed), continuous authority, pre-authorisation and others. CityPay will configure your account for the appropriate coding and this will perform transparently by the gateway. Data properties that are required, may depend on the environment you are conducting payment for. Our API aims to be flexible enough to cater for these structures. Our integration team will aid you in providing the necessary data to transact. ## E-commerce workflows For E-commerce transactions requiring 3DS, the API contains a fully accredited in built mechanism to handle authentication. The Api and gateway has been accredited extensively with both Acquirers and Card Schemes to simplify the nature of these calls into a simple structure for authentication, preventing integrators from performing lengthy and a costly accreditations with Visa and MasterCard. 3D-secure has been around for a number of years and aims to shift the liability of a transaction away from a merchant back to the card holder. A *liability shift* determines whether a card holder can charge back a transaction as unknown. Effectively the process asks for a card holder to authenticate the transaction prior to authorisation producing a Cardholder verification value (CAVV) and ecommerce indicator (ECI) as evidence of authorisation. 3DS version 1 has now been replaced by 3DS version 2 to provide secure customer authentication (SCA) in line with EU regulation. 3DSv2 is being phased out and any accounts using version 1 of the protocol is expected to be migrated by March 2022. Any new integrations should only consider 3DSv2 flows. ### 3DSv2 ```json { \"RequestChallenged\": { \"acsurl\": \"https://bank.com/3DS/ACS\", \"creq\": \"SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...\", \"merchantid\": 12345, \"transno\": 1, \"threedserver_trans_id\": \"d652d8d2-d74a-4264-a051-a7862b10d5d6\" } } ``` ```xml <RequestChallenged> <acsurl>https://bank.com/3DS/ACS</acsurl> <creq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</creq> <merchantid>12345</merchantid> <transno>1</transno> <threedserver_trans_id>d652d8d2-d74a-4264-a051-a7862b10d5d6</threedserver_trans_id> </RequestChallenged> ``` CityPay support 3DS version 2.1 for Verified by Visa, MasterCard Identity Check and American Express SafeKey 2.1. Version 2.2 is currently in development however this will be a seamless upgrade for all integrations. #### 3-D Secure - None  A basic flow may involve no 3-D secure processing. This could happen if there is no ability to perform authentication. An enrollment check may apply an \"attempted\" resolution to processing. In this instance a transaction may not meet any liability shift. A transaction may result in a decline due to this. We are also able to prevent from transactions being presented for authorisation if this occurs. #### 3-D Secure - Frictionless  E-commerce transactions supporting 3DSv2 can benefit from seamlessly authenticated transactions which may perform a \"frictionless\" flow. This method will authenticate low risk transactions with minimal impact to a standard authorisation flow. Our API simply performs this on behalf of you the developer, the merchant and cardholder. No redirection occurs and hence the flow is called frictionless and will appear as though a simple transaction authorisation has occurred. #### 3-D Secure - Challenge  A transaction that is deemed as higher risk my be \"challenged\". In this instance, the API will return a [request challenge](#requestchallenged) which will require your integration to forward the cardholder's browser to the given [ACS url](#acsurl). This should be performed by posting the [creq](#creq) value (the challenge request value). Once complete, the ACS will have already been in touch with our servers by sending us a result of the authentication known as `RReq`. To maintain session state, a parameter `threeDSSessionData` can be posted to the ACS url and will be returned alongside the `CRes` value. This will ensure that any controller code will be able to isolate state between calls. This field is to be used by your own systems rather than ours and may be any value which can uniquely identify your cardholder's session. As an option, we do provide a `threedserver_trans_id` value in the `RequestChallenged` packet which can be used for the `threeDSSessionData` value as it is used to uniquely identify the 3D-Secure session. A common method of maintaining state is to provide a session related query string value in the `merchant_termurl` value (also known as the `notificationUrl`). For example providing a url of `https://mystore.com/checkout?token=asny2348w4561..` could return the user directly back to their session with your environment. Once you have received a `cres` post from the ACS authentication service, this should be POSTed to the [cres](#cres) endpoint to perform full authorisation processing. Please note that the CRes returned to us is purely a mechanism of acknowledging that transactions should be committed for authorisation. The ACS by this point will have sent us the verification value (CAVV) to perform a liability shift. The CRes value will be validated for receipt of the CAVV and subsequently may return response codes illustrating this. To forward the user to the ACS, we recommend a simple auto submit HTML form. > Simple auto submit HTML form ```html <html lang=\"en\"> <head> <title>Forward to ACS</title> <script type=\"text/javascript\"> function onLoadEvent() { document.acs.submit(); } </script> <noscript>You will require JavaScript to be enabled to complete this transaction</noscript> </head> <body onload=\"onLoadEvent();\"> <form name=\"acs\" action=\"{{ACSURL from Response}}\" method=\"POST\"> <input type=\"hidden\" name=\"creq\" value=\"{{CReq Packet from Response}}\" /> <input type=\"hidden\" name=\"threeDSSessionData\" value=\"{{session-identifier}}\" /> </form> </body> </html> ``` A full ACS test suite is available for 3DSv2 testing. ### Testing 3DSv2 Integrations The API provides a mock 3dsV2 handler which performs a number of scenarios based on the value of the CSC in the request. | CSC Value | Behaviour | |-----------|-----------| | 731 | Frictionless processing - Not authenticated | | 732 | Frictionless processing - Account verification count not be performed | | 733 | Frictionless processing - Verification Rejected | | 741 | Frictionless processing - Attempts Processing | | 750 | Frictionless processing - Authenticated | | 761 | Triggers an error message | | Any | Challenge Request | #### 3DSv1 **Please note that 3DSv1 should now be considered as deprecated.** ```json { \"AuthenticationRequired\": { \"acsurl\": \"https://bank.com/3DS/ACS\", \"pareq\": \"SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...\", \"md\": \"WQgZXZlcnl0aGluZyBiZW\" } } ``` ```xml <AuthenticationRequired> <acsurl>https://bank.com/3DS/ACS</acsurl> <pareq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</pareq> <md>WQgZXZlcnl0aGluZyBiZW</md> </AuthenticationRequired> ``` For E-commerce transactions requiring 3DSv1, the API contains a built in MPI which will be called to check whether the card is participating in 3DSv1 with Verified by Visa or MasterCard SecureCode. We only support Amex SafeKey with 3DSv2. Should the card be enrolled, a payer request (PAReq) value will be created and returned back as an [authentication required](#authenticationrequired) response object. Your system will need to process this authentication packet and forward the user's browser to an authentication server (ACS) to gain the user's authentication. Once complete, the ACS will produce a HTTP `POST` call back to the URL supplied in the authentication request as `merchant_termurl`. This URL should behave as a controller and handle the post data from the ACS and on a forked server to server HTTP request, forward this data to the [pares authentication url](#pares) for subsequent authorisation processing. You may prefer to provide a processing page whilst this is being processed. Processing with our systems should be relatively quick and be between 500ms - 3000ms however it is desirable to let the user see that something is happening rather than a pending browser. The main reason for ensuring that this controller is two fold: 1. We are never in control of the user's browser in a server API call 2. The controller is actioned on your site to ensure that any post actions from authorisation can be executed in real time To forward the user to the ACS, we recommend a simple auto submit HTML form. > Simple auto submit HTML form ```html <html lang=\"en\"> <head> <title>Forward to ACS</title> <script type=\"text/javascript\"> function onLoadEvent() { document.acs.submit(); } </script> <noscript>You will require JavaScript to be enabled to complete this transaction</noscript> </head> <body onload=\"onLoadEvent();\"> <form name=\"acs\" action=\"{{ACSURL from Response}}\" method=\"POST\"> <input type=\"hidden\" name=\"PaReq\" value=\"{{PaReq Packet from Response}}\" /> <input type=\"hidden\" name=\"TermUrl\" value=\"{{Your Controller}}\" /> <input type=\"hidden\" name=\"MD\" value=\"{{MD From Response}}\" /> </form> </body> </html> ``` Please note that 3DSv1 is being phased out due to changes to strong customer authentication mechanisms. 3DSv2 addresses this and will solidify the authorisation and confirmation process. We provide a Test ACS for full 3DSv1 integration testing that simulates an ACS.
|
23
|
+
An authorisation process performs a standard transaction authorisation based on the provided parameters of its request.
|
24
|
+
The CityPay gateway will route your transaction via an Acquiring bank for subsequent authorisation to the appropriate card
|
25
|
+
schemes such as Visa or MasterCard.
|
26
|
+
|
27
|
+
The authorisation API should be used for server environments to process transactions on demand and in realtime.
|
28
|
+
|
29
|
+
The authorisation API can be used for multiple types of transactions including E-commerce, mail order, telephone order,
|
30
|
+
customer present (keyed), continuous authority, pre-authorisation and others. CityPay will configure your account for
|
31
|
+
the appropriate coding and this will perform transparently by the gateway.
|
32
|
+
|
33
|
+
Data properties that are required, may depend on the environment you are conducting payment for. Our API aims to be
|
34
|
+
flexible enough to cater for these structures. Our integration team will aid you in providing the necessary data to
|
35
|
+
transact.
|
36
|
+
|
37
|
+
```json
|
38
|
+
{
|
39
|
+
"RequestChallenged": {
|
40
|
+
"acsurl": "https://bank.com/3DS/ACS",
|
41
|
+
"creq": "SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...",
|
42
|
+
"merchantid": 12345,
|
43
|
+
"transno": 1,
|
44
|
+
"threedserver_trans_id": "d652d8d2-d74a-4264-a051-a7862b10d5d6"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
```
|
48
|
+
|
49
|
+
## E-commerce workflows
|
50
|
+
|
51
|
+
For E-commerce transactions requiring 3DS, the API contains a fully accredited in built mechanism to handle authentication.
|
52
|
+
|
53
|
+
The Api and gateway has been accredited extensively with both Acquirers and Card Schemes to simplify the nature of these calls
|
54
|
+
into a simple structure for authentication, preventing integrators from performing lengthy and a costly accreditations with
|
55
|
+
Visa and MasterCard.
|
56
|
+
|
57
|
+
3D-secure has been around for a number of years and aims to shift the liability of a transaction away from a merchant back
|
58
|
+
to the cardholder. A *liability shift* determines whether a card holder can charge back a transaction as unknown. Effectively
|
59
|
+
the process asks for a card holder to authenticate the transaction prior to authorisation producing a Cardholder
|
60
|
+
verification value (CAVV) and ecommerce indicator (ECI) as evidence of authorisation.
|
61
|
+
|
62
|
+
3DS version 1 has now been replaced by 3DS version 2 to provide secure customer authentication (SCA) in line with EU regulation.
|
63
|
+
3DSv2 is being phased out and any accounts using version 1 of the protocol is expected to be migrated by March 2022.
|
64
|
+
|
65
|
+
Any new integrations should only consider 3DSv2 flows.
|
66
|
+
|
67
|
+
### 3DSv2
|
68
|
+
|
69
|
+
```json
|
70
|
+
{
|
71
|
+
"RequestChallenged": {
|
72
|
+
"acsurl": "https://bank.com/3DS/ACS",
|
73
|
+
"creq": "SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...",
|
74
|
+
"merchantid": 12345,
|
75
|
+
"transno": 1,
|
76
|
+
"threedserver_trans_id": "d652d8d2-d74a-4264-a051-a7862b10d5d6"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
```
|
80
|
+
|
81
|
+
```xml
|
82
|
+
<RequestChallenged>
|
83
|
+
<acsurl>https://bank.com/3DS/ACS</acsurl>
|
84
|
+
<creq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</creq>
|
85
|
+
<merchantid>12345</merchantid>
|
86
|
+
<transno>1</transno>
|
87
|
+
<threedserver_trans_id>d652d8d2-d74a-4264-a051-a7862b10d5d6</threedserver_trans_id>
|
88
|
+
</RequestChallenged>
|
89
|
+
```
|
90
|
+
|
91
|
+
CityPay support 3DS version 2.1 for Verified by Visa, MasterCard Identity Check and American Express SafeKey 2.1. Version
|
92
|
+
2.2 is currently in development however this will be a seamless upgrade for all integrations.
|
93
|
+
|
94
|
+
#### 3-D Secure - None
|
95
|
+
|
96
|
+

|
97
|
+
|
98
|
+
A basic flow may involve no 3-D secure processing. This could happen if there is no ability to perform authentication.
|
99
|
+
An enrollment check may apply an "attempted" resolution to processing. In this instance a transaction may not meet any
|
100
|
+
liability shift. A transaction may result in a decline due to this. We are also able to prevent from transactions being
|
101
|
+
presented for authorisation if this occurs.
|
102
|
+
|
103
|
+
#### 3-D Secure - Frictionless
|
104
|
+
|
105
|
+

|
106
|
+
|
107
|
+
E-commerce transactions supporting 3DSv2 can benefit from seamlessly authenticated transactions which may perform a
|
108
|
+
"frictionless" flow. This method will authenticate low risk transactions with minimal impact to a
|
109
|
+
standard authorisation flow. Our API simply performs this on behalf of you the developer, the merchant and cardholder.
|
110
|
+
|
111
|
+
No redirection occurs and hence the flow is called frictionless and will appear as though a simple transaction
|
112
|
+
authorisation has occurred.
|
113
|
+
|
114
|
+
#### 3-D Secure - Challenge
|
115
|
+
|
116
|
+

|
117
|
+
|
118
|
+
A transaction that is deemed as higher risk my be "challenged". In this instance, the API will return a
|
119
|
+
[request challenge](#requestchallenged) which will require your integration to forward the cardholder's browser to the
|
120
|
+
given [ACS url](#acsurl). This should be performed by posting the [creq](#creq) value (the challenge request value).
|
121
|
+
|
122
|
+
Once complete, the ACS will have already been in touch with our servers by sending us a result of the authentication
|
123
|
+
known as `RReq`.
|
124
|
+
|
125
|
+
To maintain session state, a parameter `threeDSSessionData` can be posted to the ACS url and will be returned alongside
|
126
|
+
the `CRes` value. This will ensure that any controller code will be able to isolate state between calls. This field
|
127
|
+
is to be used by your own systems rather than ours and may be any value which can uniquely identify your cardholder's
|
128
|
+
session. As an option, we do provide a `threedserver_trans_id` value in the `RequestChallenged` packet which can be used
|
129
|
+
for the `threeDSSessionData` value as it is used to uniquely identify the 3D-Secure session.
|
130
|
+
|
131
|
+
A common method of maintaining state is to provide a session related query string value in the `merchant_termurl` value
|
132
|
+
(also known as the `notificationUrl`). For example providing a url of `https://mystore.com/checkout?token=asny2348w4561..`
|
133
|
+
could return the user directly back to their session with your environment.
|
134
|
+
|
135
|
+
Once you have received a `cres` post from the ACS authentication service, this should be POSTed to the [cres](#cres)
|
136
|
+
endpoint to perform full authorisation processing.
|
137
|
+
|
138
|
+
Please note that the CRes returned to us is purely a mechanism of acknowledging that transactions should be committed for
|
139
|
+
authorisation. The ACS by this point will have sent us the verification value (CAVV) to perform a liability shift. The CRes
|
140
|
+
value will be validated for receipt of the CAVV and subsequently may return response codes illustrating this.
|
141
|
+
|
142
|
+
To forward the user to the ACS, we recommend a simple auto submit HTML form.
|
143
|
+
|
144
|
+
> Simple auto submit HTML form
|
145
|
+
|
146
|
+
```html
|
147
|
+
<html lang="en">
|
148
|
+
<head>
|
149
|
+
<title>Forward to ACS</title>
|
150
|
+
<script type="text/javascript">
|
151
|
+
function onLoadEvent() {
|
152
|
+
document.acs.submit();
|
153
|
+
}
|
154
|
+
</script>
|
155
|
+
<noscript>You will require JavaScript to be enabled to complete this transaction</noscript>
|
156
|
+
</head>
|
157
|
+
<body onload="onLoadEvent();">
|
158
|
+
<form name="acs" action="{{ACSURL from Response}}" method="POST">
|
159
|
+
<input type="hidden" name="creq" value="{{CReq Packet from Response}}" />
|
160
|
+
<input type="hidden" name="threeDSSessionData" value="{{session-identifier}}" />
|
161
|
+
</form>
|
162
|
+
</body>
|
163
|
+
</html>
|
164
|
+
```
|
165
|
+
|
166
|
+
A full ACS test suite is available for 3DSv2 testing.
|
167
|
+
|
168
|
+
### Testing 3DSv2 Integrations
|
169
|
+
|
170
|
+
The API provides a mock 3dsV2 handler which performs a number of scenarios based on the value of the CSC in the request.
|
171
|
+
|
172
|
+
| CSC Value | Behaviour |
|
173
|
+
|-----------|-----------|
|
174
|
+
| 731 | Frictionless processing - Not authenticated |
|
175
|
+
| 732 | Frictionless processing - Account verification count not be performed |
|
176
|
+
| 733 | Frictionless processing - Verification Rejected |
|
177
|
+
| 741 | Frictionless processing - Attempts Processing |
|
178
|
+
| 750 | Frictionless processing - Authenticated |
|
179
|
+
| 761 | Triggers an error message |
|
180
|
+
| Any | Challenge Request |
|
181
|
+
|
182
|
+
|
183
|
+
#### 3DSv1
|
184
|
+
|
185
|
+
**Please note that 3DSv1 should now be considered as deprecated.**
|
186
|
+
|
187
|
+
```json
|
188
|
+
{
|
189
|
+
"AuthenticationRequired": {
|
190
|
+
"acsurl": "https://bank.com/3DS/ACS",
|
191
|
+
"pareq": "SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...",
|
192
|
+
"md": "WQgZXZlcnl0aGluZyBiZW"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
```
|
196
|
+
|
197
|
+
```xml
|
198
|
+
<AuthenticationRequired>
|
199
|
+
<acsurl>https://bank.com/3DS/ACS</acsurl>
|
200
|
+
<pareq>SXQgd2FzIHRoZSBiZXN0IG9mIHRpbWVzLCBpdCB3YXMgdGhlIHdvcnN00...</pareq>
|
201
|
+
<md>WQgZXZlcnl0aGluZyBiZW</md>
|
202
|
+
</AuthenticationRequired>
|
203
|
+
```
|
204
|
+
|
205
|
+
For E-commerce transactions requiring 3DSv1, the API contains a built in MPI which will be called to check whether the
|
206
|
+
card is participating in 3DSv1 with Verified by Visa or MasterCard SecureCode. We only support Amex SafeKey with 3DSv2. Should the card be enrolled, a payer
|
207
|
+
request (PAReq) value will be created and returned back as an [authentication required](#authenticationrequired) response object.
|
208
|
+
|
209
|
+
Your system will need to process this authentication packet and forward the user's browser to an authentication server (ACS)
|
210
|
+
to gain the user's authentication. Once complete, the ACS will produce a HTTP `POST` call back to the URL supplied in
|
211
|
+
the authentication request as `merchant_termurl`. This URL should behave as a controller and handle the post data from the
|
212
|
+
ACS and on a forked server to server HTTP request, forward this data to the [pares authentication url](#pares) for
|
213
|
+
subsequent authorisation processing. You may prefer to provide a processing page whilst this is being processed.
|
214
|
+
Processing with our systems should be relatively quick and be between 500ms - 3000ms however it is desirable to let
|
215
|
+
the user see that something is happening rather than a pending browser.
|
216
|
+
|
217
|
+
The main reason for ensuring that this controller is two fold:
|
218
|
+
|
219
|
+
1. We are never in control of the user's browser in a server API call
|
220
|
+
2. The controller is actioned on your site to ensure that any post actions from authorisation can be executed in real time
|
221
|
+
|
222
|
+
To forward the user to the ACS, we recommend a simple auto submit HTML form.
|
223
|
+
|
224
|
+
> Simple auto submit HTML form
|
225
|
+
|
226
|
+
```html
|
227
|
+
<html lang="en">
|
228
|
+
<head>
|
229
|
+
<title>Forward to ACS</title>
|
230
|
+
<script type="text/javascript">
|
231
|
+
function onLoadEvent() {
|
232
|
+
document.acs.submit();
|
233
|
+
}
|
234
|
+
</script>
|
235
|
+
<noscript>You will require JavaScript to be enabled to complete this transaction</noscript>
|
236
|
+
</head>
|
237
|
+
<body onload="onLoadEvent();">
|
238
|
+
<form name="acs" action="{{ACSURL from Response}}" method="POST">
|
239
|
+
<input type="hidden" name="PaReq" value="{{PaReq Packet from Response}}" />
|
240
|
+
<input type="hidden" name="TermUrl" value="{{Your Controller}}" />
|
241
|
+
<input type="hidden" name="MD" value="{{MD From Response}}" />
|
242
|
+
</form>
|
243
|
+
</body>
|
244
|
+
</html>
|
245
|
+
```
|
246
|
+
|
247
|
+
Please note that 3DSv1 is being phased out due to changes to strong customer authentication mechanisms. 3DSv2 addresses
|
248
|
+
this and will solidify the authorisation and confirmation process.
|
249
|
+
|
250
|
+
We provide a Test ACS for full 3DSv1 integration testing that simulates an ACS.
|
251
|
+
|
24
252
|
|
25
253
|
### Examples
|
26
254
|
|
@@ -33,7 +261,7 @@ CityPayApiClient.configure do |config|
|
|
33
261
|
end
|
34
262
|
|
35
263
|
api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
|
36
|
-
auth_request = CityPayApiClient::AuthRequest.new({amount: 3600, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear:
|
264
|
+
auth_request = CityPayApiClient::AuthRequest.new({amount: 3600, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear: 2027, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344}) # AuthRequest |
|
37
265
|
|
38
266
|
begin
|
39
267
|
# Authorisation
|
@@ -88,7 +316,18 @@ end
|
|
88
316
|
|
89
317
|
Bin Lookup
|
90
318
|
|
91
|
-
A bin range lookup service can be used to check what a card is, as seen by the gateway. Each card number's
|
319
|
+
A bin range lookup service can be used to check what a card is, as seen by the gateway. Each card number's
|
320
|
+
leading digits help to identify who
|
321
|
+
|
322
|
+
0. the card scheme is such as Visa, MasterCard or American Express
|
323
|
+
1. the issuer of the card, such as the bank
|
324
|
+
2. it's country of origin
|
325
|
+
3. it's currency of origin
|
326
|
+
|
327
|
+
Our gateway has 450 thousand possible bin ranges and uses a number of algorithms to determine the likelihood of the bin
|
328
|
+
data. The request requires a bin value of between 6 and 12 digits. The more digits provided may ensure a more accurate
|
329
|
+
result.
|
330
|
+
|
92
331
|
|
93
332
|
### Examples
|
94
333
|
|
@@ -156,7 +395,14 @@ end
|
|
156
395
|
|
157
396
|
CRes
|
158
397
|
|
159
|
-
The CRes request performs authorisation processing once a challenge request has been completed
|
398
|
+
The CRes request performs authorisation processing once a challenge request has been completed
|
399
|
+
with an Authentication Server (ACS). This challenge response contains confirmation that will
|
400
|
+
allow the API systems to return an authorisation response based on the result. Our systems will
|
401
|
+
know out of band via an `RReq` call by the ACS to notify us if the liability shift has been issued.
|
402
|
+
|
403
|
+
Any call to the CRes operation will require a previous authorisation request and cannot be called
|
404
|
+
on its own without a previous [request challenge](#requestchallenged) being obtained.
|
405
|
+
|
160
406
|
|
161
407
|
### Examples
|
162
408
|
|
@@ -224,7 +470,24 @@ end
|
|
224
470
|
|
225
471
|
Capture
|
226
472
|
|
227
|
-
_The capture process only applies to transactions which have been pre-authorised only._
|
473
|
+
_The capture process only applies to transactions which have been pre-authorised only._
|
474
|
+
|
475
|
+
The capture process will ensure
|
476
|
+
that a transaction will now settle. It is expected that a capture call will be provided within 3 days or
|
477
|
+
a maximum of 7 days.
|
478
|
+
|
479
|
+
A capture request is provided to confirm that you wish the transaction to be settled. This request can
|
480
|
+
contain a final amount for the transaction which is different to the original authorisation amount. This
|
481
|
+
may be useful in a delayed system process such as waiting for stock to be ordered, confirmed, or services
|
482
|
+
provided before the final cost is known.
|
483
|
+
|
484
|
+
When a transaction is completed, a new authorisation code may be created and a new confirmation
|
485
|
+
can be sent online to the acquiring bank.
|
486
|
+
|
487
|
+
Once the transaction has been processed. A standard [`Acknowledgement`](#acknowledgement) will be returned,
|
488
|
+
outlining the result of the transaction. On a successful completion process, the transaction will
|
489
|
+
be available for the settlement and completed at the end of the day.
|
490
|
+
|
228
491
|
|
229
492
|
### Examples
|
230
493
|
|
@@ -292,7 +555,14 @@ end
|
|
292
555
|
|
293
556
|
PaRes
|
294
557
|
|
295
|
-
The Payer Authentication Response (PaRes) is an operation after the result of authentication
|
558
|
+
The Payer Authentication Response (PaRes) is an operation after the result of authentication
|
559
|
+
being performed. The request uses an encoded packet of authentication data to
|
560
|
+
notify us of the completion of the liability shift. Once this value has been unpacked and its
|
561
|
+
signature is checked, our systems will proceed to authorisation processing.
|
562
|
+
|
563
|
+
Any call to the PaRes operation will require a previous authorisation request and cannot be called
|
564
|
+
on its own without a previous [authentication required](#authenticationrequired) being obtained.
|
565
|
+
|
296
566
|
|
297
567
|
### Examples
|
298
568
|
|
@@ -360,7 +630,10 @@ end
|
|
360
630
|
|
361
631
|
Refund
|
362
632
|
|
363
|
-
A refund request which allows for the refunding of a previous transaction up
|
633
|
+
A refund request which allows for the refunding of a previous transaction up
|
634
|
+
and to the amount of the original sale. A refund will be performed against the
|
635
|
+
original card used to process the transaction.
|
636
|
+
|
364
637
|
|
365
638
|
### Examples
|
366
639
|
|
@@ -428,7 +701,17 @@ end
|
|
428
701
|
|
429
702
|
Retrieval
|
430
703
|
|
431
|
-
A retrieval request which allows an integration to obtain the result of a transaction processed
|
704
|
+
A retrieval request which allows an integration to obtain the result of a transaction processed
|
705
|
+
in the last 90 days. The request allows for retrieval based on the identifier or transaction
|
706
|
+
number.
|
707
|
+
|
708
|
+
The process may return multiple results in particular where a transaction was processed multiple
|
709
|
+
times against the same identifier. This can happen if errors were first received. The API therefore
|
710
|
+
returns up to the first 5 transactions in the latest date time order.
|
711
|
+
|
712
|
+
It is not intended for this operation to be a replacement for reporting and only allows for base transaction
|
713
|
+
information to be returned.
|
714
|
+
|
432
715
|
|
433
716
|
### Examples
|
434
717
|
|
@@ -496,7 +779,15 @@ end
|
|
496
779
|
|
497
780
|
Void
|
498
781
|
|
499
|
-
_The void process generally applies to transactions which have been pre-authorised only however voids can occur
|
782
|
+
_The void process generally applies to transactions which have been pre-authorised only however voids can occur
|
783
|
+
on the same day if performed before batching and settlement._
|
784
|
+
|
785
|
+
The void process will ensure that a transaction will now settle. It is expected that a void call will be
|
786
|
+
provided on the same day before batching and settlement or within 3 days or within a maximum of 7 days.
|
787
|
+
|
788
|
+
Once the transaction has been processed as a void, an [`Acknowledgement`](#acknowledgement) will be returned,
|
789
|
+
outlining the result of the transaction.
|
790
|
+
|
500
791
|
|
501
792
|
### Examples
|
502
793
|
|