citypay_api_client 1.0.3 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +111 -39
  3. data/citypay_api_client.gemspec +5 -5
  4. data/docs/AccountCreate.md +10 -9
  5. data/docs/AccountStatus.md +8 -7
  6. data/docs/Acknowledgement.md +14 -13
  7. data/docs/AclCheckRequest.md +18 -0
  8. data/docs/AclCheckResponseModel.md +24 -0
  9. data/docs/AirlineAdvice.md +38 -37
  10. data/docs/AirlineSegment.md +22 -21
  11. data/docs/AuthReference.md +34 -33
  12. data/docs/AuthReferences.md +8 -7
  13. data/docs/AuthRequest.md +52 -49
  14. data/docs/AuthResponse.md +64 -59
  15. data/docs/AuthenRequired.md +12 -11
  16. data/docs/AuthorisationAndPaymentApi.md +850 -0
  17. data/docs/Batch.md +22 -0
  18. data/docs/BatchProcessingApi.md +218 -0
  19. data/docs/BatchReportRequest.md +20 -0
  20. data/docs/BatchReportResponseModel.md +28 -0
  21. data/docs/BatchTransaction.md +24 -0
  22. data/docs/BatchTransactionResultModel.md +44 -0
  23. data/docs/Bin.md +34 -0
  24. data/docs/BinLookup.md +18 -0
  25. data/docs/CResAuthRequest.md +8 -7
  26. data/docs/CaptureRequest.md +18 -17
  27. data/docs/Card.md +46 -41
  28. data/docs/CardHolderAccount.md +24 -21
  29. data/docs/CardHolderAccountApi.md +387 -111
  30. data/docs/CardStatus.md +10 -9
  31. data/docs/ChargeRequest.md +38 -31
  32. data/docs/CheckBatchStatus.md +20 -0
  33. data/docs/CheckBatchStatusResponse.md +18 -0
  34. data/docs/ContactDetails.md +32 -31
  35. data/docs/Decision.md +12 -11
  36. data/docs/DirectPostApi.md +389 -0
  37. data/docs/DirectPostRequest.md +60 -0
  38. data/docs/DirectTokenAuthRequest.md +24 -0
  39. data/docs/DomainKeyCheckRequest.md +18 -0
  40. data/docs/DomainKeyRequest.md +22 -0
  41. data/docs/DomainKeyResponse.md +26 -0
  42. data/docs/Error.md +16 -13
  43. data/docs/EventDataModel.md +26 -0
  44. data/docs/Exists.md +22 -0
  45. data/docs/ExternalMPI.md +16 -15
  46. data/docs/ListMerchantsResponse.md +12 -11
  47. data/docs/MCC6012.md +14 -13
  48. data/docs/Merchant.md +16 -15
  49. data/docs/OperationalFunctionsApi.md +375 -0
  50. data/docs/PaResAuthRequest.md +10 -9
  51. data/docs/PaylinkAddress.md +30 -0
  52. data/docs/PaylinkAdjustmentRequest.md +22 -0
  53. data/docs/PaylinkApi.md +806 -0
  54. data/docs/PaylinkAttachmentRequest.md +26 -0
  55. data/docs/PaylinkAttachmentResult.md +22 -0
  56. data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
  57. data/docs/PaylinkCardHolder.md +36 -0
  58. data/docs/PaylinkCart.md +30 -0
  59. data/docs/PaylinkCartItemModel.md +32 -0
  60. data/docs/PaylinkConfig.md +60 -0
  61. data/docs/PaylinkCustomParam.md +38 -0
  62. data/docs/PaylinkEmailNotificationPath.md +26 -0
  63. data/docs/PaylinkErrorCode.md +20 -0
  64. data/docs/PaylinkFieldGuardModel.md +30 -0
  65. data/docs/PaylinkPartPayments.md +28 -0
  66. data/docs/PaylinkSMSNotificationPath.md +20 -0
  67. data/docs/PaylinkStateEvent.md +22 -0
  68. data/docs/PaylinkTokenCreated.md +44 -0
  69. data/docs/PaylinkTokenRequestModel.md +42 -0
  70. data/docs/PaylinkTokenStatus.md +72 -0
  71. data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
  72. data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
  73. data/docs/PaylinkUI.md +24 -0
  74. data/docs/Ping.md +8 -7
  75. data/docs/ProcessBatchRequest.md +24 -0
  76. data/docs/ProcessBatchResponse.md +20 -0
  77. data/docs/RefundRequest.md +26 -0
  78. data/docs/RegisterCard.md +16 -13
  79. data/docs/RequestChallenged.md +16 -15
  80. data/docs/RetrieveRequest.md +12 -11
  81. data/docs/ThreeDSecure.md +32 -15
  82. data/docs/TokenisationResponseModel.md +36 -0
  83. data/docs/VoidRequest.md +12 -13
  84. data/docs/images/3dsv1-challenge.png +0 -0
  85. data/docs/images/3dsv2-challenge.png +0 -0
  86. data/docs/images/3dsv2-frictionless.png +0 -0
  87. data/docs/images/3dsv2-method-challenge.png +0 -0
  88. data/docs/images/3dsv2-method-frictionless.png +0 -0
  89. data/docs/images/3dsv2-no3d.png +0 -0
  90. data/docs/images/citypay-logo.svg +1 -0
  91. data/docs/images/direct-post-flow.png +0 -0
  92. data/docs/images/favicon.ico +0 -0
  93. data/docs/images/header.png +0 -0
  94. data/docs/images/logo.ai +1913 -4
  95. data/docs/images/logo.png +0 -0
  96. data/docs/images/logo.svg +1 -0
  97. data/docs/images/merchant-BPS-workflow.png +0 -0
  98. data/docs/images/paylink-field-guards.png +0 -0
  99. data/lib/.DS_Store +0 -0
  100. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
  101. data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
  102. data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
  103. data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
  104. data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
  105. data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
  106. data/lib/citypay_api_client/api_client.rb +72 -70
  107. data/lib/citypay_api_client/api_error.rb +3 -2
  108. data/lib/citypay_api_client/configuration.rb +74 -17
  109. data/lib/citypay_api_client/models/account_create.rb +33 -23
  110. data/lib/citypay_api_client/models/account_status.rb +31 -23
  111. data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
  112. data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
  113. data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
  114. data/lib/citypay_api_client/models/airline_advice.rb +63 -34
  115. data/lib/citypay_api_client/models/airline_segment.rb +51 -25
  116. data/lib/citypay_api_client/models/auth_reference.rb +80 -31
  117. data/lib/citypay_api_client/models/auth_references.rb +31 -23
  118. data/lib/citypay_api_client/models/auth_request.rb +137 -56
  119. data/lib/citypay_api_client/models/auth_response.rb +83 -123
  120. data/lib/citypay_api_client/models/authen_required.rb +31 -23
  121. data/lib/citypay_api_client/models/batch.rb +267 -0
  122. data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
  123. data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
  124. data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
  125. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
  126. data/lib/citypay_api_client/models/bin.rb +294 -0
  127. data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
  128. data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
  129. data/lib/citypay_api_client/models/capture_request.rb +59 -38
  130. data/lib/citypay_api_client/models/card.rb +93 -29
  131. data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
  132. data/lib/citypay_api_client/models/card_status.rb +31 -23
  133. data/lib/citypay_api_client/models/charge_request.rb +154 -47
  134. data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
  135. data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
  136. data/lib/citypay_api_client/models/contact_details.rb +130 -52
  137. data/lib/citypay_api_client/models/decision.rb +31 -23
  138. data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
  139. data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
  140. data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
  141. data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
  142. data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
  143. data/lib/citypay_api_client/models/error.rb +57 -31
  144. data/lib/citypay_api_client/models/event_data_model.rb +254 -0
  145. data/lib/citypay_api_client/models/exists.rb +241 -0
  146. data/lib/citypay_api_client/models/external_mpi.rb +61 -27
  147. data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
  148. data/lib/citypay_api_client/models/mcc6012.rb +31 -23
  149. data/lib/citypay_api_client/models/merchant.rb +31 -23
  150. data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
  151. data/lib/citypay_api_client/models/paylink_address.rb +425 -0
  152. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
  153. data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
  154. data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
  155. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
  156. data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
  157. data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
  158. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
  159. data/lib/citypay_api_client/models/paylink_config.rb +428 -0
  160. data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
  161. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
  162. data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
  163. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
  164. data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
  165. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
  166. data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
  167. data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
  168. data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
  169. data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
  170. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
  171. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
  172. data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
  173. data/lib/citypay_api_client/models/ping.rb +37 -25
  174. data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
  175. data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
  176. data/lib/citypay_api_client/models/refund_request.rb +339 -0
  177. data/lib/citypay_api_client/models/register_card.rb +79 -27
  178. data/lib/citypay_api_client/models/request_challenged.rb +39 -31
  179. data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
  180. data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
  181. data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
  182. data/lib/citypay_api_client/models/void_request.rb +39 -37
  183. data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
  184. data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
  185. data/lib/citypay_api_client/version.rb +3 -4
  186. data/lib/citypay_api_client.rb +53 -6
  187. data/spec/.DS_Store +0 -0
  188. data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
  189. data/spec/api/batch_processing_api___spec.rb +70 -0
  190. data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
  191. data/spec/api/direct_post_api___spec.rb +98 -0
  192. data/spec/api/operational_functions_api___spec.rb +94 -0
  193. data/spec/api/paylink_api___spec.rb +131 -0
  194. data/spec/api_client_spec.rb +4 -4
  195. data/spec/configuration_spec.rb +5 -5
  196. data/spec/it_api_sandbox_spec.rb +117 -55
  197. data/spec/models/account_create_spec.rb +1 -2
  198. data/spec/models/account_status_spec.rb +2 -2
  199. data/spec/models/acknowledgement_spec.rb +7 -22
  200. data/spec/models/acl_check_request_spec.rb +33 -0
  201. data/spec/models/acl_check_response_model_spec.rb +51 -0
  202. data/spec/models/airline_advice_spec.rb +0 -2
  203. data/spec/models/airline_segment_spec.rb +0 -2
  204. data/spec/models/auth_references_spec.rb +7 -8
  205. data/spec/models/auth_request_spec.rb +0 -2
  206. data/spec/models/auth_response_spec.rb +77 -33
  207. data/spec/models/batch_report_request_spec.rb +37 -0
  208. data/spec/models/batch_report_response_model_spec.rb +61 -0
  209. data/spec/models/batch_spec.rb +43 -0
  210. data/spec/models/batch_transaction_result_model_spec.rb +85 -0
  211. data/spec/models/batch_transaction_spec.rb +49 -0
  212. data/spec/models/bin_lookup_spec.rb +31 -0
  213. data/spec/models/bin_spec.rb +81 -0
  214. data/spec/models/capture_request_spec.rb +0 -2
  215. data/spec/models/card_holder_account_spec.rb +8 -7
  216. data/spec/models/charge_request_spec.rb +0 -2
  217. data/spec/models/check_batch_status_response_spec.rb +45 -0
  218. data/spec/models/check_batch_status_spec.rb +39 -0
  219. data/spec/models/decision_spec.rb +1 -1
  220. data/spec/models/direct_post_request_spec.rb +151 -0
  221. data/spec/models/direct_token_auth_request_spec.rb +51 -0
  222. data/spec/models/domain_key_check_request_spec.rb +31 -0
  223. data/spec/models/domain_key_request_spec.rb +45 -0
  224. data/spec/models/domain_key_response_spec.rb +57 -0
  225. data/spec/models/event_data_model_spec.rb +57 -0
  226. data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
  227. data/spec/models/list_merchants_response_spec.rb +2 -2
  228. data/spec/models/paylink_address_spec.rb +69 -0
  229. data/spec/models/paylink_adjustment_request_spec.rb +45 -0
  230. data/spec/models/paylink_attachment_request_spec.rb +45 -0
  231. data/spec/models/paylink_attachment_result_spec.rb +45 -0
  232. data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
  233. data/spec/models/paylink_card_holder_spec.rb +87 -0
  234. data/spec/models/paylink_cart_item_model_spec.rb +75 -0
  235. data/spec/models/paylink_cart_spec.rb +69 -0
  236. data/spec/models/paylink_config_spec.rb +159 -0
  237. data/spec/models/paylink_custom_param_spec.rb +87 -0
  238. data/spec/models/paylink_email_notification_path_spec.rb +57 -0
  239. data/spec/models/paylink_error_code_spec.rb +39 -0
  240. data/spec/models/paylink_field_guard_model_spec.rb +45 -0
  241. data/spec/models/paylink_part_payments_spec.rb +63 -0
  242. data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
  243. data/spec/models/paylink_state_event_spec.rb +45 -0
  244. data/spec/models/paylink_token_created_spec.rb +111 -0
  245. data/spec/models/paylink_token_request_model_spec.rb +91 -0
  246. data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
  247. data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
  248. data/spec/models/paylink_token_status_spec.rb +195 -0
  249. data/spec/models/paylink_ui_spec.rb +51 -0
  250. data/spec/models/process_batch_request_spec.rb +49 -0
  251. data/spec/models/process_batch_response_spec.rb +39 -0
  252. data/spec/models/refund_request_spec.rb +62 -0
  253. data/spec/models/register_card_spec.rb +0 -2
  254. data/spec/models/tokenisation_response_model_spec.rb +87 -0
  255. data/spec/spec_helper.rb +2 -2
  256. data/spec/utils/direct_post_mac_spec.rb +13 -0
  257. metadata +230 -44
  258. data/Gemfile.lock +0 -70
  259. data/docs/OperationalApi.md +0 -112
  260. data/docs/PaymentProcessingApi.md +0 -320
  261. data/git_push.sh +0 -58
  262. data/lib/citypay_api_client/api/operational_api.rb +0 -147
  263. data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
  264. data/lib/citypay_api_client/test.rb +0 -20
  265. data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -0,0 +1,850 @@
1
+ # CityPayApiClient::AuthorisationAndPaymentApi
2
+
3
+ All URIs are relative to *https://api.citypay.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**authorisation_request**](AuthorisationAndPaymentApi.md#authorisation_request) | **POST** /v6/authorise | Authorisation |
8
+ | [**bin_range_lookup_request**](AuthorisationAndPaymentApi.md#bin_range_lookup_request) | **POST** /v6/bin | Bin Lookup |
9
+ | [**c_res_request**](AuthorisationAndPaymentApi.md#c_res_request) | **POST** /v6/cres | CRes |
10
+ | [**capture_request**](AuthorisationAndPaymentApi.md#capture_request) | **POST** /v6/capture | Capture |
11
+ | [**pa_res_request**](AuthorisationAndPaymentApi.md#pa_res_request) | **POST** /v6/pares | PaRes |
12
+ | [**refund_request**](AuthorisationAndPaymentApi.md#refund_request) | **POST** /v6/refund | Refund |
13
+ | [**retrieval_request**](AuthorisationAndPaymentApi.md#retrieval_request) | **POST** /v6/retrieve | Retrieval |
14
+ | [**void_request**](AuthorisationAndPaymentApi.md#void_request) | **POST** /v6/void | Void |
15
+
16
+
17
+ ## authorisation_request
18
+
19
+ > <Decision> authorisation_request(auth_request)
20
+
21
+ Authorisation
22
+
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
+ ![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
+
252
+
253
+ ### Examples
254
+
255
+ ```ruby
256
+ require 'time'
257
+ require 'citypay_api_client'
258
+ # setup authorization
259
+ CityPayApiClient.configure do |config|
260
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
261
+ end
262
+
263
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
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 |
265
+
266
+ begin
267
+ # Authorisation
268
+ result = api_instance.authorisation_request(auth_request)
269
+ p result
270
+ rescue CityPayApiClient::ApiError => e
271
+ puts "Error when calling AuthorisationAndPaymentApi->authorisation_request: #{e}"
272
+ end
273
+ ```
274
+
275
+ #### Using the authorisation_request_with_http_info variant
276
+
277
+ This returns an Array which contains the response data, status code and headers.
278
+
279
+ > <Array(<Decision>, Integer, Hash)> authorisation_request_with_http_info(auth_request)
280
+
281
+ ```ruby
282
+ begin
283
+ # Authorisation
284
+ data, status_code, headers = api_instance.authorisation_request_with_http_info(auth_request)
285
+ p status_code # => 2xx
286
+ p headers # => { ... }
287
+ p data # => <Decision>
288
+ rescue CityPayApiClient::ApiError => e
289
+ puts "Error when calling AuthorisationAndPaymentApi->authorisation_request_with_http_info: #{e}"
290
+ end
291
+ ```
292
+
293
+ ### Parameters
294
+
295
+ | Name | Type | Description | Notes |
296
+ | ---- | ---- | ----------- | ----- |
297
+ | **auth_request** | [**AuthRequest**](AuthRequest.md) | | |
298
+
299
+ ### Return type
300
+
301
+ [**Decision**](Decision.md)
302
+
303
+ ### Authorization
304
+
305
+ [cp-api-key](../README.md#cp-api-key)
306
+
307
+ ### HTTP request headers
308
+
309
+ - **Content-Type**: application/json, text/xml
310
+ - **Accept**: application/json, text/xml
311
+
312
+
313
+ ## bin_range_lookup_request
314
+
315
+ > <Bin> bin_range_lookup_request(bin_lookup)
316
+
317
+ Bin Lookup
318
+
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
+
331
+
332
+ ### Examples
333
+
334
+ ```ruby
335
+ require 'time'
336
+ require 'citypay_api_client'
337
+ # setup authorization
338
+ CityPayApiClient.configure do |config|
339
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
340
+ end
341
+
342
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
343
+ bin_lookup = CityPayApiClient::BinLookup.new({bin: 543712}) # BinLookup |
344
+
345
+ begin
346
+ # Bin Lookup
347
+ result = api_instance.bin_range_lookup_request(bin_lookup)
348
+ p result
349
+ rescue CityPayApiClient::ApiError => e
350
+ puts "Error when calling AuthorisationAndPaymentApi->bin_range_lookup_request: #{e}"
351
+ end
352
+ ```
353
+
354
+ #### Using the bin_range_lookup_request_with_http_info variant
355
+
356
+ This returns an Array which contains the response data, status code and headers.
357
+
358
+ > <Array(<Bin>, Integer, Hash)> bin_range_lookup_request_with_http_info(bin_lookup)
359
+
360
+ ```ruby
361
+ begin
362
+ # Bin Lookup
363
+ data, status_code, headers = api_instance.bin_range_lookup_request_with_http_info(bin_lookup)
364
+ p status_code # => 2xx
365
+ p headers # => { ... }
366
+ p data # => <Bin>
367
+ rescue CityPayApiClient::ApiError => e
368
+ puts "Error when calling AuthorisationAndPaymentApi->bin_range_lookup_request_with_http_info: #{e}"
369
+ end
370
+ ```
371
+
372
+ ### Parameters
373
+
374
+ | Name | Type | Description | Notes |
375
+ | ---- | ---- | ----------- | ----- |
376
+ | **bin_lookup** | [**BinLookup**](BinLookup.md) | | |
377
+
378
+ ### Return type
379
+
380
+ [**Bin**](Bin.md)
381
+
382
+ ### Authorization
383
+
384
+ [cp-api-key](../README.md#cp-api-key)
385
+
386
+ ### HTTP request headers
387
+
388
+ - **Content-Type**: application/json, text/xml
389
+ - **Accept**: application/json, text/xml
390
+
391
+
392
+ ## c_res_request
393
+
394
+ > <AuthResponse> c_res_request(c_res_auth_request)
395
+
396
+ CRes
397
+
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
+
406
+
407
+ ### Examples
408
+
409
+ ```ruby
410
+ require 'time'
411
+ require 'citypay_api_client'
412
+ # setup authorization
413
+ CityPayApiClient.configure do |config|
414
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
415
+ end
416
+
417
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
418
+ c_res_auth_request = CityPayApiClient::CResAuthRequest.new # CResAuthRequest |
419
+
420
+ begin
421
+ # CRes
422
+ result = api_instance.c_res_request(c_res_auth_request)
423
+ p result
424
+ rescue CityPayApiClient::ApiError => e
425
+ puts "Error when calling AuthorisationAndPaymentApi->c_res_request: #{e}"
426
+ end
427
+ ```
428
+
429
+ #### Using the c_res_request_with_http_info variant
430
+
431
+ This returns an Array which contains the response data, status code and headers.
432
+
433
+ > <Array(<AuthResponse>, Integer, Hash)> c_res_request_with_http_info(c_res_auth_request)
434
+
435
+ ```ruby
436
+ begin
437
+ # CRes
438
+ data, status_code, headers = api_instance.c_res_request_with_http_info(c_res_auth_request)
439
+ p status_code # => 2xx
440
+ p headers # => { ... }
441
+ p data # => <AuthResponse>
442
+ rescue CityPayApiClient::ApiError => e
443
+ puts "Error when calling AuthorisationAndPaymentApi->c_res_request_with_http_info: #{e}"
444
+ end
445
+ ```
446
+
447
+ ### Parameters
448
+
449
+ | Name | Type | Description | Notes |
450
+ | ---- | ---- | ----------- | ----- |
451
+ | **c_res_auth_request** | [**CResAuthRequest**](CResAuthRequest.md) | | |
452
+
453
+ ### Return type
454
+
455
+ [**AuthResponse**](AuthResponse.md)
456
+
457
+ ### Authorization
458
+
459
+ [cp-api-key](../README.md#cp-api-key)
460
+
461
+ ### HTTP request headers
462
+
463
+ - **Content-Type**: application/json, text/xml
464
+ - **Accept**: application/json, text/xml
465
+
466
+
467
+ ## capture_request
468
+
469
+ > <Acknowledgement> capture_request(capture_request)
470
+
471
+ Capture
472
+
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
+
491
+
492
+ ### Examples
493
+
494
+ ```ruby
495
+ require 'time'
496
+ require 'citypay_api_client'
497
+ # setup authorization
498
+ CityPayApiClient.configure do |config|
499
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
500
+ end
501
+
502
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
503
+ capture_request = CityPayApiClient::CaptureRequest.new({merchantid: 11223344}) # CaptureRequest |
504
+
505
+ begin
506
+ # Capture
507
+ result = api_instance.capture_request(capture_request)
508
+ p result
509
+ rescue CityPayApiClient::ApiError => e
510
+ puts "Error when calling AuthorisationAndPaymentApi->capture_request: #{e}"
511
+ end
512
+ ```
513
+
514
+ #### Using the capture_request_with_http_info variant
515
+
516
+ This returns an Array which contains the response data, status code and headers.
517
+
518
+ > <Array(<Acknowledgement>, Integer, Hash)> capture_request_with_http_info(capture_request)
519
+
520
+ ```ruby
521
+ begin
522
+ # Capture
523
+ data, status_code, headers = api_instance.capture_request_with_http_info(capture_request)
524
+ p status_code # => 2xx
525
+ p headers # => { ... }
526
+ p data # => <Acknowledgement>
527
+ rescue CityPayApiClient::ApiError => e
528
+ puts "Error when calling AuthorisationAndPaymentApi->capture_request_with_http_info: #{e}"
529
+ end
530
+ ```
531
+
532
+ ### Parameters
533
+
534
+ | Name | Type | Description | Notes |
535
+ | ---- | ---- | ----------- | ----- |
536
+ | **capture_request** | [**CaptureRequest**](CaptureRequest.md) | | |
537
+
538
+ ### Return type
539
+
540
+ [**Acknowledgement**](Acknowledgement.md)
541
+
542
+ ### Authorization
543
+
544
+ [cp-api-key](../README.md#cp-api-key)
545
+
546
+ ### HTTP request headers
547
+
548
+ - **Content-Type**: application/json, text/xml
549
+ - **Accept**: application/json, text/xml
550
+
551
+
552
+ ## pa_res_request
553
+
554
+ > <AuthResponse> pa_res_request(pa_res_auth_request)
555
+
556
+ PaRes
557
+
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
+
566
+
567
+ ### Examples
568
+
569
+ ```ruby
570
+ require 'time'
571
+ require 'citypay_api_client'
572
+ # setup authorization
573
+ CityPayApiClient.configure do |config|
574
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
575
+ end
576
+
577
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
578
+ pa_res_auth_request = CityPayApiClient::PaResAuthRequest.new({md: 'md_example', pares: 'v66ycfSp8jNlvy7PkHbx44NEt3vox90+vZ/7Ll05Vid/jPfQn8adw+4D/vRDUGT19kndW97Hfirb...'}) # PaResAuthRequest |
579
+
580
+ begin
581
+ # PaRes
582
+ result = api_instance.pa_res_request(pa_res_auth_request)
583
+ p result
584
+ rescue CityPayApiClient::ApiError => e
585
+ puts "Error when calling AuthorisationAndPaymentApi->pa_res_request: #{e}"
586
+ end
587
+ ```
588
+
589
+ #### Using the pa_res_request_with_http_info variant
590
+
591
+ This returns an Array which contains the response data, status code and headers.
592
+
593
+ > <Array(<AuthResponse>, Integer, Hash)> pa_res_request_with_http_info(pa_res_auth_request)
594
+
595
+ ```ruby
596
+ begin
597
+ # PaRes
598
+ data, status_code, headers = api_instance.pa_res_request_with_http_info(pa_res_auth_request)
599
+ p status_code # => 2xx
600
+ p headers # => { ... }
601
+ p data # => <AuthResponse>
602
+ rescue CityPayApiClient::ApiError => e
603
+ puts "Error when calling AuthorisationAndPaymentApi->pa_res_request_with_http_info: #{e}"
604
+ end
605
+ ```
606
+
607
+ ### Parameters
608
+
609
+ | Name | Type | Description | Notes |
610
+ | ---- | ---- | ----------- | ----- |
611
+ | **pa_res_auth_request** | [**PaResAuthRequest**](PaResAuthRequest.md) | | |
612
+
613
+ ### Return type
614
+
615
+ [**AuthResponse**](AuthResponse.md)
616
+
617
+ ### Authorization
618
+
619
+ [cp-api-key](../README.md#cp-api-key)
620
+
621
+ ### HTTP request headers
622
+
623
+ - **Content-Type**: application/json, text/xml
624
+ - **Accept**: application/json, text/xml
625
+
626
+
627
+ ## refund_request
628
+
629
+ > <AuthResponse> refund_request(refund_request)
630
+
631
+ Refund
632
+
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
+
637
+
638
+ ### Examples
639
+
640
+ ```ruby
641
+ require 'time'
642
+ require 'citypay_api_client'
643
+ # setup authorization
644
+ CityPayApiClient.configure do |config|
645
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
646
+ end
647
+
648
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
649
+ refund_request = CityPayApiClient::RefundRequest.new({amount: 3600, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344, refund_ref: 8322}) # RefundRequest |
650
+
651
+ begin
652
+ # Refund
653
+ result = api_instance.refund_request(refund_request)
654
+ p result
655
+ rescue CityPayApiClient::ApiError => e
656
+ puts "Error when calling AuthorisationAndPaymentApi->refund_request: #{e}"
657
+ end
658
+ ```
659
+
660
+ #### Using the refund_request_with_http_info variant
661
+
662
+ This returns an Array which contains the response data, status code and headers.
663
+
664
+ > <Array(<AuthResponse>, Integer, Hash)> refund_request_with_http_info(refund_request)
665
+
666
+ ```ruby
667
+ begin
668
+ # Refund
669
+ data, status_code, headers = api_instance.refund_request_with_http_info(refund_request)
670
+ p status_code # => 2xx
671
+ p headers # => { ... }
672
+ p data # => <AuthResponse>
673
+ rescue CityPayApiClient::ApiError => e
674
+ puts "Error when calling AuthorisationAndPaymentApi->refund_request_with_http_info: #{e}"
675
+ end
676
+ ```
677
+
678
+ ### Parameters
679
+
680
+ | Name | Type | Description | Notes |
681
+ | ---- | ---- | ----------- | ----- |
682
+ | **refund_request** | [**RefundRequest**](RefundRequest.md) | | |
683
+
684
+ ### Return type
685
+
686
+ [**AuthResponse**](AuthResponse.md)
687
+
688
+ ### Authorization
689
+
690
+ [cp-api-key](../README.md#cp-api-key)
691
+
692
+ ### HTTP request headers
693
+
694
+ - **Content-Type**: application/json, text/xml
695
+ - **Accept**: application/json, text/xml
696
+
697
+
698
+ ## retrieval_request
699
+
700
+ > <AuthReferences> retrieval_request(retrieve_request)
701
+
702
+ Retrieval
703
+
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
+
715
+
716
+ ### Examples
717
+
718
+ ```ruby
719
+ require 'time'
720
+ require 'citypay_api_client'
721
+ # setup authorization
722
+ CityPayApiClient.configure do |config|
723
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
724
+ end
725
+
726
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
727
+ retrieve_request = CityPayApiClient::RetrieveRequest.new({merchantid: 11223344}) # RetrieveRequest |
728
+
729
+ begin
730
+ # Retrieval
731
+ result = api_instance.retrieval_request(retrieve_request)
732
+ p result
733
+ rescue CityPayApiClient::ApiError => e
734
+ puts "Error when calling AuthorisationAndPaymentApi->retrieval_request: #{e}"
735
+ end
736
+ ```
737
+
738
+ #### Using the retrieval_request_with_http_info variant
739
+
740
+ This returns an Array which contains the response data, status code and headers.
741
+
742
+ > <Array(<AuthReferences>, Integer, Hash)> retrieval_request_with_http_info(retrieve_request)
743
+
744
+ ```ruby
745
+ begin
746
+ # Retrieval
747
+ data, status_code, headers = api_instance.retrieval_request_with_http_info(retrieve_request)
748
+ p status_code # => 2xx
749
+ p headers # => { ... }
750
+ p data # => <AuthReferences>
751
+ rescue CityPayApiClient::ApiError => e
752
+ puts "Error when calling AuthorisationAndPaymentApi->retrieval_request_with_http_info: #{e}"
753
+ end
754
+ ```
755
+
756
+ ### Parameters
757
+
758
+ | Name | Type | Description | Notes |
759
+ | ---- | ---- | ----------- | ----- |
760
+ | **retrieve_request** | [**RetrieveRequest**](RetrieveRequest.md) | | |
761
+
762
+ ### Return type
763
+
764
+ [**AuthReferences**](AuthReferences.md)
765
+
766
+ ### Authorization
767
+
768
+ [cp-api-key](../README.md#cp-api-key)
769
+
770
+ ### HTTP request headers
771
+
772
+ - **Content-Type**: application/json, text/xml
773
+ - **Accept**: application/json, text/xml
774
+
775
+
776
+ ## void_request
777
+
778
+ > <Acknowledgement> void_request(void_request)
779
+
780
+ Void
781
+
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
+
791
+
792
+ ### Examples
793
+
794
+ ```ruby
795
+ require 'time'
796
+ require 'citypay_api_client'
797
+ # setup authorization
798
+ CityPayApiClient.configure do |config|
799
+ config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
800
+ end
801
+
802
+ api_instance = CityPayApiClient::AuthorisationAndPaymentApi.new
803
+ void_request = CityPayApiClient::VoidRequest.new({merchantid: 11223344}) # VoidRequest |
804
+
805
+ begin
806
+ # Void
807
+ result = api_instance.void_request(void_request)
808
+ p result
809
+ rescue CityPayApiClient::ApiError => e
810
+ puts "Error when calling AuthorisationAndPaymentApi->void_request: #{e}"
811
+ end
812
+ ```
813
+
814
+ #### Using the void_request_with_http_info variant
815
+
816
+ This returns an Array which contains the response data, status code and headers.
817
+
818
+ > <Array(<Acknowledgement>, Integer, Hash)> void_request_with_http_info(void_request)
819
+
820
+ ```ruby
821
+ begin
822
+ # Void
823
+ data, status_code, headers = api_instance.void_request_with_http_info(void_request)
824
+ p status_code # => 2xx
825
+ p headers # => { ... }
826
+ p data # => <Acknowledgement>
827
+ rescue CityPayApiClient::ApiError => e
828
+ puts "Error when calling AuthorisationAndPaymentApi->void_request_with_http_info: #{e}"
829
+ end
830
+ ```
831
+
832
+ ### Parameters
833
+
834
+ | Name | Type | Description | Notes |
835
+ | ---- | ---- | ----------- | ----- |
836
+ | **void_request** | [**VoidRequest**](VoidRequest.md) | | |
837
+
838
+ ### Return type
839
+
840
+ [**Acknowledgement**](Acknowledgement.md)
841
+
842
+ ### Authorization
843
+
844
+ [cp-api-key](../README.md#cp-api-key)
845
+
846
+ ### HTTP request headers
847
+
848
+ - **Content-Type**: application/json, text/xml
849
+ - **Accept**: application/json, text/xml
850
+