citypay_api_client 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +73 -0
- data/README.md +59 -32
- data/citypay_api_client.gemspec +1 -1
- data/docs/Acknowledgement.md +2 -2
- data/docs/AclCheckResponseModel.md +3 -3
- data/docs/AuthRequest.md +7 -7
- data/docs/AuthResponse.md +4 -4
- data/docs/AuthorisationAndPaymentApi.md +75 -231
- data/docs/Batch.md +1 -1
- data/docs/BatchProcessingApi.md +11 -11
- data/docs/BatchReportResponseModel.md +2 -2
- data/docs/BatchTransaction.md +1 -1
- data/docs/BatchTransactionReportRequest.md +22 -0
- data/docs/BatchTransactionReportResponse.md +24 -0
- data/docs/BatchTransactionResultModel.md +1 -1
- data/docs/Bin.md +2 -2
- data/docs/CaptureRequest.md +1 -1
- data/docs/Card.md +2 -2
- data/docs/CardHolderAccountApi.md +9 -5
- data/docs/ChargeRequest.md +7 -7
- data/docs/Decision.md +0 -2
- data/docs/DirectPostApi.md +2 -16
- data/docs/DirectPostRequest.md +7 -7
- data/docs/EventDataModel.md +2 -2
- data/docs/MerchantBatchReportRequest.md +28 -0
- data/docs/MerchantBatchReportResponse.md +24 -0
- data/docs/MerchantBatchResponse.md +30 -0
- data/docs/NetSummaryResponse.md +32 -0
- data/docs/PaylinkAdjustmentRequest.md +1 -1
- data/docs/PaylinkApi.md +141 -1
- data/docs/PaylinkBillPaymentTokenRequest.md +1 -1
- data/docs/PaylinkErrorCode.md +2 -2
- data/docs/PaylinkResendNotificationRequest.md +20 -0
- data/docs/PaylinkStateEvent.md +4 -4
- data/docs/PaylinkTokenCreated.md +11 -11
- data/docs/PaylinkTokenStatus.md +7 -7
- data/docs/PaylinkTokenStatusChangeRequest.md +7 -7
- data/docs/PaylinkTokenStatusChangeResponse.md +6 -2
- data/docs/PaymentIntent.md +42 -0
- data/docs/PaymentIntentReference.md +18 -0
- data/docs/RefundRequest.md +1 -1
- data/docs/RemittanceData.md +28 -0
- data/docs/RemittanceReportRequest.md +28 -0
- data/docs/RemittanceReportResponse.md +24 -0
- data/docs/RemittedClientData.md +44 -0
- data/docs/ReportingApi.md +378 -0
- data/docs/TokenisationResponseModel.md +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +71 -3
- data/lib/citypay_api_client/api/batch_processing_api__.rb +7 -7
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +4 -1
- data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
- data/lib/citypay_api_client/api/operational_functions_api__.rb +1 -1
- data/lib/citypay_api_client/api/paylink_api__.rb +138 -1
- data/lib/citypay_api_client/api/reporting_api__.rb +381 -0
- data/lib/citypay_api_client/api_client.rb +1 -1
- data/lib/citypay_api_client/api_error.rb +1 -1
- data/lib/citypay_api_client/configuration.rb +1 -1
- data/lib/citypay_api_client/models/account_create.rb +1 -1
- data/lib/citypay_api_client/models/account_status.rb +1 -1
- data/lib/citypay_api_client/models/acknowledgement.rb +1 -29
- data/lib/citypay_api_client/models/acl_check_request.rb +1 -1
- data/lib/citypay_api_client/models/acl_check_response_model.rb +2 -2
- data/lib/citypay_api_client/models/airline_advice.rb +1 -1
- data/lib/citypay_api_client/models/airline_segment.rb +1 -1
- data/lib/citypay_api_client/models/auth_reference.rb +1 -1
- data/lib/citypay_api_client/models/auth_references.rb +1 -1
- data/lib/citypay_api_client/models/auth_request.rb +10 -9
- data/lib/citypay_api_client/models/auth_response.rb +2 -2
- data/lib/citypay_api_client/models/batch.rb +2 -2
- data/lib/citypay_api_client/models/batch_report_request.rb +1 -1
- data/lib/citypay_api_client/models/batch_report_response_model.rb +2 -2
- data/lib/citypay_api_client/models/batch_transaction.rb +1 -1
- data/lib/citypay_api_client/models/batch_transaction_report_request.rb +234 -0
- data/lib/citypay_api_client/models/batch_transaction_report_response.rb +252 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +1 -1
- data/lib/citypay_api_client/models/bin.rb +1 -1
- data/lib/citypay_api_client/models/bin_lookup.rb +1 -1
- data/lib/citypay_api_client/models/c_res_auth_request.rb +1 -1
- data/lib/citypay_api_client/models/capture_request.rb +1 -1
- data/lib/citypay_api_client/models/card.rb +1 -1
- data/lib/citypay_api_client/models/card_holder_account.rb +1 -1
- data/lib/citypay_api_client/models/card_status.rb +1 -1
- data/lib/citypay_api_client/models/charge_request.rb +10 -9
- data/lib/citypay_api_client/models/check_batch_status.rb +1 -1
- data/lib/citypay_api_client/models/check_batch_status_response.rb +1 -1
- data/lib/citypay_api_client/models/contact_details.rb +1 -1
- data/lib/citypay_api_client/models/decision.rb +2 -11
- data/lib/citypay_api_client/models/direct_post_request.rb +10 -9
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +1 -1
- data/lib/citypay_api_client/models/domain_key_check_request.rb +1 -1
- data/lib/citypay_api_client/models/domain_key_request.rb +1 -1
- data/lib/citypay_api_client/models/domain_key_response.rb +1 -1
- data/lib/citypay_api_client/models/error.rb +1 -1
- data/lib/citypay_api_client/models/event_data_model.rb +1 -1
- data/lib/citypay_api_client/models/exists.rb +1 -1
- data/lib/citypay_api_client/models/external_mpi.rb +1 -1
- data/lib/citypay_api_client/models/list_merchants_response.rb +1 -1
- data/lib/citypay_api_client/models/mcc6012.rb +1 -1
- data/lib/citypay_api_client/models/merchant.rb +1 -1
- data/lib/citypay_api_client/models/merchant_batch_report_request.rb +265 -0
- data/lib/citypay_api_client/models/merchant_batch_report_response.rb +252 -0
- data/lib/citypay_api_client/models/merchant_batch_response.rb +301 -0
- data/lib/citypay_api_client/models/net_summary_response.rb +472 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +1 -1
- data/lib/citypay_api_client/models/paylink_address.rb +1 -1
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +1 -1
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +1 -1
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +1 -1
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +1 -1
- data/lib/citypay_api_client/models/paylink_card_holder.rb +1 -1
- data/lib/citypay_api_client/models/paylink_cart.rb +1 -1
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +1 -1
- data/lib/citypay_api_client/models/paylink_config.rb +1 -1
- data/lib/citypay_api_client/models/paylink_custom_param.rb +1 -1
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +1 -1
- data/lib/citypay_api_client/models/paylink_error_code.rb +1 -1
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +1 -1
- data/lib/citypay_api_client/models/paylink_part_payments.rb +1 -1
- data/lib/citypay_api_client/models/paylink_resend_notification_request.rb +224 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +1 -1
- data/lib/citypay_api_client/models/paylink_state_event.rb +2 -2
- data/lib/citypay_api_client/models/paylink_token_created.rb +36 -8
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +1 -1
- data/lib/citypay_api_client/models/paylink_token_status.rb +30 -2
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +6 -7
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +23 -3
- data/lib/citypay_api_client/models/paylink_ui.rb +1 -1
- data/lib/citypay_api_client/models/payment_intent.rb +479 -0
- data/lib/citypay_api_client/models/payment_intent_reference.rb +221 -0
- data/lib/citypay_api_client/models/ping.rb +1 -1
- data/lib/citypay_api_client/models/process_batch_request.rb +1 -1
- data/lib/citypay_api_client/models/process_batch_response.rb +1 -1
- data/lib/citypay_api_client/models/refund_request.rb +1 -1
- data/lib/citypay_api_client/models/register_card.rb +1 -1
- data/lib/citypay_api_client/models/remittance_data.rb +404 -0
- data/lib/citypay_api_client/models/remittance_report_request.rb +265 -0
- data/lib/citypay_api_client/models/remittance_report_response.rb +252 -0
- data/lib/citypay_api_client/models/remitted_client_data.rb +612 -0
- data/lib/citypay_api_client/models/request_challenged.rb +1 -1
- data/lib/citypay_api_client/models/retrieve_request.rb +1 -1
- data/lib/citypay_api_client/models/three_d_secure.rb +1 -1
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +1 -1
- data/lib/citypay_api_client/models/void_request.rb +1 -1
- data/lib/citypay_api_client/version.rb +2 -2
- data/lib/citypay_api_client.rb +15 -2
- data/spec/.DS_Store +0 -0
- data/spec/api/reporting_api___spec.rb +99 -0
- data/spec/it_api_sandbox_spec.rb +0 -3
- data/spec/models/batch_transaction_report_request_spec.rb +47 -0
- data/spec/models/batch_transaction_report_response_spec.rb +53 -0
- data/spec/models/decision_spec.rb +0 -26
- data/spec/models/merchant_batch_report_request_spec.rb +65 -0
- data/spec/models/merchant_batch_report_response_spec.rb +53 -0
- data/spec/models/merchant_batch_response_spec.rb +71 -0
- data/spec/models/net_summary_response_spec.rb +77 -0
- data/spec/models/paylink_resend_notification_request_spec.rb +41 -0
- data/spec/models/payment_intent_reference_spec.rb +35 -0
- data/spec/models/payment_intent_spec.rb +107 -0
- data/spec/models/remittance_data_spec.rb +65 -0
- data/spec/models/remittance_report_request_spec.rb +65 -0
- data/spec/models/remittance_report_response_spec.rb +53 -0
- data/spec/models/remitted_client_data_spec.rb +113 -0
- data/spec/spec_helper.rb +1 -1
- metadata +124 -69
- data/spec/models/authen_required_spec.rb +0 -52
@@ -8,6 +8,7 @@ All URIs are relative to *https://api.citypay.com*
|
|
8
8
|
| [**bin_range_lookup_request**](AuthorisationAndPaymentApi.md#bin_range_lookup_request) | **POST** /v6/bin | Bin Lookup |
|
9
9
|
| [**c_res_request**](AuthorisationAndPaymentApi.md#c_res_request) | **POST** /v6/cres | CRes |
|
10
10
|
| [**capture_request**](AuthorisationAndPaymentApi.md#capture_request) | **POST** /v6/capture | Capture |
|
11
|
+
| [**create_payment_intent**](AuthorisationAndPaymentApi.md#create_payment_intent) | **POST** /v6/intent/create | Create a Payment Intent |
|
11
12
|
| [**pa_res_request**](AuthorisationAndPaymentApi.md#pa_res_request) | **POST** /v6/pares | PaRes |
|
12
13
|
| [**refund_request**](AuthorisationAndPaymentApi.md#refund_request) | **POST** /v6/refund | Refund |
|
13
14
|
| [**retrieval_request**](AuthorisationAndPaymentApi.md#retrieval_request) | **POST** /v6/retrieve | Retrieval |
|
@@ -20,235 +21,7 @@ All URIs are relative to *https://api.citypay.com*
|
|
20
21
|
|
21
22
|
Authorisation
|
22
23
|
|
23
|
-
|
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
|
-
![3DSv2 Frctionless Flow](images/3dsv2-no3d.png)
|
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
|
-
![3DSv2 Frctionless Flow](images/3dsv2-frictionless.png)
|
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
|
-
![3DSv2 Frctionless Flow](images/3dsv2-challenge.png)
|
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
|
+
Performs a request for authorisation for a card payment request.
|
252
25
|
|
253
26
|
### Examples
|
254
27
|
|
@@ -261,7 +34,7 @@ CityPayApiClient.configure do |config|
|
|
261
34
|
end
|
262
35
|
|
263
36
|
api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
|
264
|
-
auth_request = CityPayApiClient::AuthRequest.new({amount:
|
37
|
+
auth_request = CityPayApiClient::AuthRequest.new({amount: 19995, cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear: 2027, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344}) # AuthRequest |
|
265
38
|
|
266
39
|
begin
|
267
40
|
# Authorisation
|
@@ -549,6 +322,77 @@ end
|
|
549
322
|
- **Accept**: application/json, text/xml
|
550
323
|
|
551
324
|
|
325
|
+
## create_payment_intent
|
326
|
+
|
327
|
+
> <PaymentIntentReference> create_payment_intent(payment_intent)
|
328
|
+
|
329
|
+
Create a Payment Intent
|
330
|
+
|
331
|
+
This endpoint initiates the creation of a payment intent, which is a precursor to processing a payment. A payment intent
|
332
|
+
captures the details of a prospective payment transaction, including the payment amount, currency, and associated
|
333
|
+
billing and shipping information.
|
334
|
+
|
335
|
+
|
336
|
+
### Examples
|
337
|
+
|
338
|
+
```ruby
|
339
|
+
require 'time'
|
340
|
+
require 'citypay_api_client'
|
341
|
+
# setup authorization
|
342
|
+
CityPayApiClient.configure do |config|
|
343
|
+
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
344
|
+
end
|
345
|
+
|
346
|
+
api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
|
347
|
+
payment_intent = CityPayApiClient::PaymentIntent.new({amount: 19995, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95'}) # PaymentIntent |
|
348
|
+
|
349
|
+
begin
|
350
|
+
# Create a Payment Intent
|
351
|
+
result = api_instance.create_payment_intent(payment_intent)
|
352
|
+
p result
|
353
|
+
rescue CityPayApiClient::ApiError => e
|
354
|
+
puts "Error when calling AuthorisationAndPaymentApi->create_payment_intent: #{e}"
|
355
|
+
end
|
356
|
+
```
|
357
|
+
|
358
|
+
#### Using the create_payment_intent_with_http_info variant
|
359
|
+
|
360
|
+
This returns an Array which contains the response data, status code and headers.
|
361
|
+
|
362
|
+
> <Array(<PaymentIntentReference>, Integer, Hash)> create_payment_intent_with_http_info(payment_intent)
|
363
|
+
|
364
|
+
```ruby
|
365
|
+
begin
|
366
|
+
# Create a Payment Intent
|
367
|
+
data, status_code, headers = api_instance.create_payment_intent_with_http_info(payment_intent)
|
368
|
+
p status_code # => 2xx
|
369
|
+
p headers # => { ... }
|
370
|
+
p data # => <PaymentIntentReference>
|
371
|
+
rescue CityPayApiClient::ApiError => e
|
372
|
+
puts "Error when calling AuthorisationAndPaymentApi->create_payment_intent_with_http_info: #{e}"
|
373
|
+
end
|
374
|
+
```
|
375
|
+
|
376
|
+
### Parameters
|
377
|
+
|
378
|
+
| Name | Type | Description | Notes |
|
379
|
+
| ---- | ---- | ----------- | ----- |
|
380
|
+
| **payment_intent** | [**PaymentIntent**](PaymentIntent.md) | | |
|
381
|
+
|
382
|
+
### Return type
|
383
|
+
|
384
|
+
[**PaymentIntentReference**](PaymentIntentReference.md)
|
385
|
+
|
386
|
+
### Authorization
|
387
|
+
|
388
|
+
[cp-api-key](../README.md#cp-api-key)
|
389
|
+
|
390
|
+
### HTTP request headers
|
391
|
+
|
392
|
+
- **Content-Type**: application/json, text/xml
|
393
|
+
- **Accept**: application/json, text/xml
|
394
|
+
|
395
|
+
|
552
396
|
## pa_res_request
|
553
397
|
|
554
398
|
> <AuthResponse> pa_res_request(pa_res_auth_request)
|
@@ -646,7 +490,7 @@ CityPayApiClient.configure do |config|
|
|
646
490
|
end
|
647
491
|
|
648
492
|
api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
|
649
|
-
refund_request = CityPayApiClient::RefundRequest.new({amount:
|
493
|
+
refund_request = CityPayApiClient::RefundRequest.new({amount: 19995, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344, refund_ref: 8322}) # RefundRequest |
|
650
494
|
|
651
495
|
begin
|
652
496
|
# Refund
|
data/docs/Batch.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **batch_date** | **Date** | The date that the file was created in ISO-8601 format. | |
|
8
8
|
| **batch_id** | **Integer** | The batch id requested. | [optional] |
|
9
|
-
| **batch_status** | **String** | The status of the batch. Possible values are
|
9
|
+
| **batch_status** | **String** | The status of the batch. Possible values are: - CANCELLED. The file has been cancelled by an administrator or server process. - COMPLETE. The file has passed through the processing cycle and is determined as being complete further information should be obtained on the results of the processing - ERROR_IN_PROCESSING. Errors have occurred in the processing that has deemed that processing can not continue. - INITIALISED. The file has been initialised and no action has yet been performed - LOCKED. The file has been locked for processing - QUEUED. The file has been queued for processing yet no processing has yet been performed - UNKNOWN. The file is of an unknown status, that is the file can either not be determined by the information requested of the file has not yet been received. | |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
data/docs/BatchProcessingApi.md
CHANGED
@@ -5,8 +5,8 @@ All URIs are relative to *https://api.citypay.com*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**batch_process_request**](BatchProcessingApi.md#batch_process_request) | **POST** /v6/batch/process | Batch Process Request |
|
8
|
-
| [**batch_retrieve_request**](BatchProcessingApi.md#batch_retrieve_request) | **POST** /v6/batch/retrieve |
|
9
|
-
| [**check_batch_status_request**](BatchProcessingApi.md#check_batch_status_request) | **POST** /v6/batch/status |
|
8
|
+
| [**batch_retrieve_request**](BatchProcessingApi.md#batch_retrieve_request) | **POST** /v6/batch/retrieve | Batch Retrieve Request |
|
9
|
+
| [**check_batch_status_request**](BatchProcessingApi.md#check_batch_status_request) | **POST** /v6/batch/status | Check Batch Status |
|
10
10
|
|
11
11
|
|
12
12
|
## batch_process_request
|
@@ -32,7 +32,7 @@ CityPayApiClient.configure do |config|
|
|
32
32
|
end
|
33
33
|
|
34
34
|
api_instance = CityPayApiClient::BatchProcessingApi.new
|
35
|
-
process_batch_request = CityPayApiClient::ProcessBatchRequest.new({batch_date: Date.parse('Thu Jan 02 00:00:00 UTC 2020'), batch_id: 35, transactions: [CityPayApiClient::BatchTransaction.new({account_id: 'aaabbb-cccddd-eee', amount:
|
35
|
+
process_batch_request = CityPayApiClient::ProcessBatchRequest.new({batch_date: Date.parse('Thu Jan 02 00:00:00 UTC 2020'), batch_id: 35, transactions: [CityPayApiClient::BatchTransaction.new({account_id: 'aaabbb-cccddd-eee', amount: 19995})]}) # ProcessBatchRequest |
|
36
36
|
|
37
37
|
begin
|
38
38
|
# Batch Process Request
|
@@ -85,9 +85,9 @@ end
|
|
85
85
|
|
86
86
|
> <BatchReportResponseModel> batch_retrieve_request(batch_report_request)
|
87
87
|
|
88
|
-
|
88
|
+
Batch Retrieve Request
|
89
89
|
|
90
|
-
|
90
|
+
Obtains a batch and installment (BIS) report for a given batch id.
|
91
91
|
|
92
92
|
### Examples
|
93
93
|
|
@@ -103,7 +103,7 @@ api_instance = CityPayApiClient::BatchProcessingApi.new
|
|
103
103
|
batch_report_request = CityPayApiClient::BatchReportRequest.new({batch_id: 35}) # BatchReportRequest |
|
104
104
|
|
105
105
|
begin
|
106
|
-
#
|
106
|
+
# Batch Retrieve Request
|
107
107
|
result = api_instance.batch_retrieve_request(batch_report_request)
|
108
108
|
p result
|
109
109
|
rescue CityPayApiClient::ApiError => e
|
@@ -119,7 +119,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
119
119
|
|
120
120
|
```ruby
|
121
121
|
begin
|
122
|
-
#
|
122
|
+
# Batch Retrieve Request
|
123
123
|
data, status_code, headers = api_instance.batch_retrieve_request_with_http_info(batch_report_request)
|
124
124
|
p status_code # => 2xx
|
125
125
|
p headers # => { ... }
|
@@ -153,7 +153,7 @@ end
|
|
153
153
|
|
154
154
|
> <CheckBatchStatusResponse> check_batch_status_request(check_batch_status)
|
155
155
|
|
156
|
-
|
156
|
+
Check Batch Status
|
157
157
|
|
158
158
|
The operation is used to retrieve the status of a batch process.
|
159
159
|
|
@@ -168,10 +168,10 @@ CityPayApiClient.configure do |config|
|
|
168
168
|
end
|
169
169
|
|
170
170
|
api_instance = CityPayApiClient::BatchProcessingApi.new
|
171
|
-
check_batch_status = CityPayApiClient::CheckBatchStatus.new({batch_id: [
|
171
|
+
check_batch_status = CityPayApiClient::CheckBatchStatus.new({batch_id: [37]}) # CheckBatchStatus |
|
172
172
|
|
173
173
|
begin
|
174
|
-
#
|
174
|
+
# Check Batch Status
|
175
175
|
result = api_instance.check_batch_status_request(check_batch_status)
|
176
176
|
p result
|
177
177
|
rescue CityPayApiClient::ApiError => e
|
@@ -187,7 +187,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
187
187
|
|
188
188
|
```ruby
|
189
189
|
begin
|
190
|
-
#
|
190
|
+
# Check Batch Status
|
191
191
|
data, status_code, headers = api_instance.check_batch_status_request_with_http_info(check_batch_status)
|
192
192
|
p status_code # => 2xx
|
193
193
|
p headers # => { ... }
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| **amount** | **Integer** | The total amount that the batch contains. | |
|
8
8
|
| **batch_date** | **Date** | The date and time of the batch in ISO-8601 format. | |
|
9
9
|
| **batch_id** | **Integer** | The batch id specified in the batch processing request. | |
|
10
|
-
| **batch_status** | **String** | The status of the batch. Possible values are
|
10
|
+
| **batch_status** | **String** | The status of the batch. Possible values are: - CANCELLED. The file has been cancelled by an administrator or server process. - COMPLETE. The file has passed through the processing cycle and is determined as being complete further information should be obtained on the results of the processing - ERROR_IN_PROCESSING. Errors have occurred in the processing that has deemed that processing can not continue. - INITIALISED. The file has been initialised and no action has yet been performed - LOCKED. The file has been locked for processing - QUEUED. The file has been queued for processing yet no processing has yet been performed - UNKNOWN. The file is of an unknown status, that is the file can either not be determined by the information requested of the file has not yet been received. | |
|
11
11
|
| **client_account_id** | **String** | The batch account id that the batch was processed with. | |
|
12
12
|
| **transactions** | [**Array<BatchTransactionResultModel>**](BatchTransactionResultModel.md) | | |
|
13
13
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
require 'citypay_api_client'
|
18
18
|
|
19
19
|
instance = CityPayApiClient::BatchReportResponseModel.new(
|
20
|
-
amount:
|
20
|
+
amount: 19995,
|
21
21
|
batch_date: Thu Jan 02 00:00:00 UTC 2020,
|
22
22
|
batch_id: 35,
|
23
23
|
batch_status: COMPLETE,
|
data/docs/BatchTransaction.md
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# CityPayApiClient::BatchTransactionReportRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **max_results** | **Integer** | The maximum number of results to return in a single response. This value is used to limit the size of data returned by the API, enhancing performance and manageability. Values should be between 5 and 250. | [optional] |
|
8
|
+
| **next_token** | **String** | A token that identifies the starting point of the page of results to be returned. An empty value indicates the start of the dataset. When supplied, it is validated and used to fetch the subsequent page of results. This token is typically obtained from the response of a previous pagination request. | [optional] |
|
9
|
+
| **order_by** | **String** | Specifies the field by which results are ordered. Available fields are [trans_no,date_when,amount]. By default, fields are ordered by OrderByExpression(trans_no,ASC). To order in descending order, prefix with '-' or suffix with ' DESC'. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'citypay_api_client'
|
15
|
+
|
16
|
+
instance = CityPayApiClient::BatchTransactionReportRequest.new(
|
17
|
+
max_results: 50,
|
18
|
+
next_token: n34liuwn435tUAGFNg34yn...,
|
19
|
+
order_by: date
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# CityPayApiClient::BatchTransactionReportResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **count** | **Integer** | The count of items returned in this page. | [optional] |
|
8
|
+
| **data** | [**Array<AuthReference>**](AuthReference.md) | | |
|
9
|
+
| **max_results** | **Integer** | The max results requested in this page. | [optional] |
|
10
|
+
| **next_token** | **String** | A token that identifies the starting point of the page of results to be returned. An empty value indicates the start of the dataset. When supplied, it is validated and used to fetch the subsequent page of results. This token is typically obtained from the response of a previous pagination request. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'citypay_api_client'
|
16
|
+
|
17
|
+
instance = CityPayApiClient::BatchTransactionReportResponse.new(
|
18
|
+
count: 25,
|
19
|
+
data: null,
|
20
|
+
max_results: 50,
|
21
|
+
next_token: n34liuwn435tUAGFNg34yn...
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -26,7 +26,7 @@ require 'citypay_api_client'
|
|
26
26
|
|
27
27
|
instance = CityPayApiClient::BatchTransactionResultModel.new(
|
28
28
|
account_id: aaabbb-cccddd-eee,
|
29
|
-
amount:
|
29
|
+
amount: 19995,
|
30
30
|
authcode: 001245A,
|
31
31
|
datetime: 2020-01-02T18:32:28Z,
|
32
32
|
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
data/docs/Bin.md
CHANGED
@@ -22,9 +22,9 @@ require 'citypay_api_client'
|
|
22
22
|
instance = CityPayApiClient::Bin.new(
|
23
23
|
bin_commercial: null,
|
24
24
|
bin_corporate: null,
|
25
|
-
bin_country_issued:
|
25
|
+
bin_country_issued: GB,
|
26
26
|
bin_credit: null,
|
27
|
-
bin_currency:
|
27
|
+
bin_currency: GBP,
|
28
28
|
bin_debit: null,
|
29
29
|
bin_description: Platinum Card,
|
30
30
|
bin_eu: null,
|
data/docs/CaptureRequest.md
CHANGED
data/docs/Card.md
CHANGED
@@ -33,9 +33,9 @@ require 'citypay_api_client'
|
|
33
33
|
instance = CityPayApiClient::Card.new(
|
34
34
|
bin_commercial: null,
|
35
35
|
bin_corporate: null,
|
36
|
-
bin_country_issued:
|
36
|
+
bin_country_issued: GB,
|
37
37
|
bin_credit: null,
|
38
|
-
bin_currency:
|
38
|
+
bin_currency: GBP,
|
39
39
|
bin_debit: null,
|
40
40
|
bin_description: Platinum Card,
|
41
41
|
bin_eu: null,
|
@@ -18,7 +18,7 @@ All URIs are relative to *https://api.citypay.com*
|
|
18
18
|
|
19
19
|
## account_card_delete_request
|
20
20
|
|
21
|
-
> <Acknowledgement> account_card_delete_request(accountid, card_id)
|
21
|
+
> <Acknowledgement> account_card_delete_request(accountid, card_id, opts)
|
22
22
|
|
23
23
|
Card Deletion
|
24
24
|
|
@@ -39,10 +39,13 @@ end
|
|
39
39
|
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
40
40
|
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
41
41
|
card_id = 'card_id_example' # String | The id of the card that is presented by a call to retrieve a card holder account.
|
42
|
+
opts = {
|
43
|
+
force: true # Boolean | Requests that the item is forced immediately.
|
44
|
+
}
|
42
45
|
|
43
46
|
begin
|
44
47
|
# Card Deletion
|
45
|
-
result = api_instance.account_card_delete_request(accountid, card_id)
|
48
|
+
result = api_instance.account_card_delete_request(accountid, card_id, opts)
|
46
49
|
p result
|
47
50
|
rescue CityPayApiClient::ApiError => e
|
48
51
|
puts "Error when calling CardHolderAccountApi->account_card_delete_request: #{e}"
|
@@ -53,12 +56,12 @@ end
|
|
53
56
|
|
54
57
|
This returns an Array which contains the response data, status code and headers.
|
55
58
|
|
56
|
-
> <Array(<Acknowledgement>, Integer, Hash)> account_card_delete_request_with_http_info(accountid, card_id)
|
59
|
+
> <Array(<Acknowledgement>, Integer, Hash)> account_card_delete_request_with_http_info(accountid, card_id, opts)
|
57
60
|
|
58
61
|
```ruby
|
59
62
|
begin
|
60
63
|
# Card Deletion
|
61
|
-
data, status_code, headers = api_instance.account_card_delete_request_with_http_info(accountid, card_id)
|
64
|
+
data, status_code, headers = api_instance.account_card_delete_request_with_http_info(accountid, card_id, opts)
|
62
65
|
p status_code # => 2xx
|
63
66
|
p headers # => { ... }
|
64
67
|
p data # => <Acknowledgement>
|
@@ -73,6 +76,7 @@ end
|
|
73
76
|
| ---- | ---- | ----------- | ----- |
|
74
77
|
| **accountid** | **String** | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. | |
|
75
78
|
| **card_id** | **String** | The id of the card that is presented by a call to retrieve a card holder account. | |
|
79
|
+
| **force** | **Boolean** | Requests that the item is forced immediately. | [optional] |
|
76
80
|
|
77
81
|
### Return type
|
78
82
|
|
@@ -714,7 +718,7 @@ CityPayApiClient.configure do |config|
|
|
714
718
|
end
|
715
719
|
|
716
720
|
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
717
|
-
charge_request = CityPayApiClient::ChargeRequest.new({amount:
|
721
|
+
charge_request = CityPayApiClient::ChargeRequest.new({amount: 19995, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344, token: 'ctPCAPyNyCkx3Ry8wGyv8khC3ch2hUSB3Db..Qzr'}) # ChargeRequest |
|
718
722
|
|
719
723
|
begin
|
720
724
|
# Charge
|