Changes for page Card Payments

Last modified by Trieu Tran on 2019/12/04 14:16
From empty
To version 179.1
edited by Kevin Jonsson
on 2019/11/13 09:36
Change comment: Changed the example code for urls, logoUrl and termsOfServiceUrl was missing https which is required

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +Card Payments
Parent
... ... @@ -1,0 +1,1 @@
1 +developer:Main.ecommerce.technical-reference.core-payment-resources.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +xwiki:XWiki.jbf
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Tags
... ... @@ -1,0 +1,1 @@
1 +px-custom-page-content
Content
... ... @@ -1,0 +1,1857 @@
1 +== General ==
2 +
3 +**Glossary**
4 +
5 +(% class="table-bordered table-striped" %)
6 +|=Term|=Description
7 +|##Recurring## (requires ##recurrenceToken##)|Subscription type payment. E.g monthly debited amount for service.
8 +|##Stored Card## (requires ##paymentToken##)|Store card data from the consumer to allow future payments to be simplified.
9 +|##Verification Transaction## (operation ##Verify##)|Create a payment without charging the consumer. Use to create a ##recurrenceToken## for recurring payment or ##paymentToken## to store a card without charging an amount.
10 +
11 +== Payment Resource ==
12 +
13 +The {{code}}payment{{/code}} resource and all general sub-resources can be found in the [[core payment resources>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome]] section.
14 +
15 +== Create Payment ==
16 +
17 +Within the card payments part of the eCommerce API, you can create four kinds of payments ([[purchase>>doc:||anchor="HPurchase"]], [[recurrence>>doc:||anchor="HRecur"]], [[payout>>doc:||anchor="HPayout"]] and [[verification>>doc:||anchor="HVerify"]]) and you can inspect and alter the details of the individual transactions within the payment.
18 +
19 +To create a card payment, you perform an HTTP ##{{code}}POST{{/code}}## against the ##/psp/creditcard/payments## resource. Please read the [[general information >>doc:Main.ecommerce.technical-reference.WebHome]]on how to compose a valid HTTP request before proceeding.
20 +
21 +There are four different kinds of payment that can be created. These are identified with the value of the ##operation## property. Each kind are documented in their own section below.
22 +
23 +All four payments have a common structure that is described below. Use the [[##expand##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HExpansion"]] request parameter to get a response that includes one or more expanded sub-resources inlined.
24 +
25 +{{code language="http" title="**Request**"}}
26 +
27 +POST /psp/creditcard/payments HTTP/1.1
28 +Host: api.payex.com
29 +Authorization: Bearer <MerchantToken>
30 +Content-Type: application/json
31 +
32 +{
33 + "payment": {
34 + "operation": "<operation>",
35 + "intent": "<intent>",
36 + }
37 +}
38 +{{/code}}
39 +
40 +**Properties**
41 +
42 +(% class="table-bordered table-striped" %)
43 +|=Property|=Data type|=Required|=Description
44 +|##payment.operation##|##string##|Y|(((
45 +Determines the initial operation, that defines the type card payment created.## ##
46 +
47 +##Purchase.## Used to charge a card. It is followed up by a capture or cancel operation.
48 +
49 +##Recur. ##Used to charge a card on a recurring basis. Is followed up by a capture or cancel operation (if not Autocapture is used, that is).
50 +
51 +(% style="font-family:monospace" %)Payout. Used to (%%)deposit funds directly to credit card. No more requests are necessary from the merchant side.
52 +
53 +(% style="font-family:monospace" %)Verify. (%%)Used when authorizing a card withouth reserveing any funds. It is followed up by a verification transaction.
54 +)))
55 +|##payment.intent##|##string##|Y|(((
56 +The ##intent## of the payment identifies how and when the charge will be effectuated. This determine the type transactions used during the payment process.
57 +
58 +##PreAuthorization. H##olds the funds for a certain time in contrast to reserving the amount. A preauthoriations is always followed by the [[finalize>>doc:||anchor="HFinalize"]] operation
59 +
60 +##Authorization.## Reserves the amount, and is followed by a [[cancellation>>doc:||anchor="HCancellations"]] or [[capture>>doc:||anchor="HCaptures"]] of funds.
61 +
62 +##AutoCapture. ##A one phase-option that enable capture of funds automatically after authorization.
63 +)))
64 +
65 +The response will be as the {{code}}payment{{/code}} resource is described above.
66 +
67 +=== Purchase ===
68 +
69 +A ##Purchase## payment is a straightforward way to charge the card of the payer. It is followed up by posting a capture, cancellation or reversal transaction.
70 +
71 +An example of a request is provided below. Each individual Property of the JSON document is described in the following section. Use the [[##expand##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HExpansion"]] request parameter to get a response that includes one or more expanded sub-resources inlined.
72 +
73 +{{code language="http" title="**Request**"}}
74 +
75 +POST /psp/creditcard/payments HTTP/1.1
76 +Authorization: Bearer <MerchantToken>
77 +Content-Type: application/json
78 +
79 +{
80 + "payment": {
81 + "operation": "Purchase",
82 + "intent": "Authorization",
83 + "paymentToken": "",
84 + "currency": "SEK",
85 + "prices": [{
86 + "type": "CreditCard",
87 + "amount": 1500,
88 + "vatAmount": 0
89 + },
90 + {
91 + "type": "Visa",
92 + "amount": 1500,
93 + "vatAmount": 0
94 + },
95 + {
96 + "type": "MasterCard",
97 + "amount": 1500,
98 + "vatAmount": 0
99 + }
100 + ],
101 + "description": "Test Purchase",
102 + "payerReference": "AB1234",
103 + "generatePaymentToken": "false",
104 + "generateRecurrenceToken": "false",
105 + "userAgent": "Mozilla/5.0...",
106 + "language": "sv-SE",
107 + "urls": {
108 + "hostUrls": ["http://test-dummy.net"],
109 + "completeUrl": "http://test-dummy.net/payment-completed",
110 + "cancelUrl": "http://test-dummy.net/payment-canceled",
111 + "paymentUrl": "http://example.com/perform-payment",
112 + "callbackUrl": "http://test-dummy.net/payment-callback",
113 + "logoUrl": "https://test-dummy.net/payment-logo.png",
114 + "termsOfServiceUrl": "https://test-dummy.net/payment-terms.pdf",
115 + },
116 + "payeeInfo": {
117 + "payeeId": "12345678-1234-1234-1234-123456789012",
118 + "payeeReference": "CD1234",
119 + "payeeName": "Merchant1",
120 + "productCategory": "A123",
121 + "orderReference": "or123",
122 + "subsite": "MySubsite"
123 + },
124 + "metadata": {
125 + "key1": "value1",
126 + "key2": 2,
127 + "key3": 3.1,
128 + "key4": false
129 + },
130 + "cardholder": {
131 + "firstName": "firstname/companyname",
132 + "lastName": "lastname",
133 + "email": "string",
134 + "msisdn": "string",
135 + "homePhoneNumber": "string",
136 + "workPhoneNumber": "string",
137 + "shippingAddress": {
138 + "firstName": "firstname",
139 + "lastName": "lastname",
140 + "email": "string",
141 + "msisdn": "string",
142 + "streetAddress": "string",
143 + "coAddress": "string",
144 + "city": "string",
145 + "zipCode": "string",
146 + "countryCode": "string"
147 + },
148 + "billingAddress": {
149 + "firstName": "firstname/companyname",
150 + "lastName": "lastname",
151 + "email": "string",
152 + "msisdn": "string",
153 + "streetAddress": "string",
154 + "coAddress": "string",
155 + "city": "string",
156 + "zipCode": "string",
157 + "countryCode": "string"
158 + },
159 + "accountInfo": {
160 + "accountAgeIndicator": "01",
161 + "accountChangeIndicator": "01",
162 + "accountPwdChangeIndicator": "01",
163 + "shippingAddressUsageIndicator": "01",
164 + "shippingNameIndicator": "01",
165 + "suspiciousAccountActivity": "01",
166 + "addressMatchIndicator": "false"
167 + }
168 + },
169 + "riskIndicator": {
170 + "deliveryEmailAddress": "string",
171 + "deliveryTimeFrameindicator": "01",
172 + "preOrderDate": "YYYYMMDD",
173 + "preOrderPurchaseIndicator": "01",
174 + "shipIndicator": "01",
175 + "giftCardPurchase": "false",
176 + "reOrderPurchaseIndicator": "01",
177 + "pickUpAddress": {
178 + "name": "companyname",
179 + "streetAddress": "string",
180 + "coAddress": "string",
181 + "city": "string",
182 + "zipCode": "string",
183 + "countryCode": "string"
184 + }
185 + }
186 + },
187 + "creditCard": {
188 + "rejectCreditCards": false,
189 + "rejectDebitCards": false,
190 + "rejectConsumerCards": false,
191 + "rejectCorporateCards": false,
192 + }
193 +}
194 +{{/code}}
195 +
196 +
197 +(% class="table-bordered table-striped" %)
198 +|=Property|=Data type|=Required|=Description
199 +|##operation##|##string##|(% style="text-align:center" %)Y|##Purchase##
200 +|##intent##|##string##|(% style="text-align:center" %)Y|(((
201 +##PreAuthorization. H##olds the funds for a certain time in contrast to reserving the amount. A preauthoriations is always followed by the [[finalize>>doc:||anchor="HFinalize"]] operation
202 +
203 +##Authorization.## Reserves the amount, and is followed by a [[cancellation>>doc:||anchor="HCancellations"]] or [[capture>>doc:||anchor="HCaptures"]] of funds.
204 +
205 +##AutoCapture. ##A one phase option that enable capture of funds automatically after authorization.
206 +)))
207 +|##paymentToken##|##string##|(% style="text-align:center" %)N|If you put in a paymentToken here, the payment page will preload the stored payment data related to the paymentToken and let the consumer make a purchase without having to enter all card data. This is called a "One Click" purchase.
208 +|##currency##|##string##|(% style="text-align:center" %)Y|##NOK##, ##SEK##, ##DKK##, ##USD## or ##EUR##.
209 +|##prices.type##|##string##|(% style="text-align:center" %)Y|(((
210 +Use the generic type ##CreditCard## if you want to enable all card brands supported by merchant contract. Use card brands like ##Visa## (for card type Visa), ##MasterCard## (for card type Mastercard) and others if you want to specify different amount for each card brand. If you want to use more than one amount you must have one instance in the prices node for each card brand. You will not be allowed to both specify card brands and ##CreditCard## at the same time in this field. [[See the Prices resource and prices object types for more information>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HPricesobjecttypes"]].
211 +)))
212 +|##prices.amount##|##integer##|(% style="text-align:center" %)Y|Amount is entered in the lowest monetary units of the selected currency. E.g. 10000 = 100.00 NOK, 5000 = 50.00 SEK.
213 +|##prices.vatAmount##|##integer##|(% style="text-align:center" %)Y|If the amount given includes VAT, this may be displayed for the user in the payment page (redirect only). Set to 0 (zero) if this is not relevant.
214 +|##description##|##string(40)##|(% style="text-align:center" %)Y|A textual description max 40 characters of the purchase.
215 +|##payerReference##|##string##|(% style="text-align:center" %)N|The reference to the payer (consumer/end user) from the merchant system. E.g mobile number, customer number etc.
216 +|##generatePaymentToken##|##boolean##|(% style="text-align:center" %)N|##true## or ##false##. Set this to ##true## if you want to create a paymentToken for future use as One Click.
217 +|##generateRecurrenceToken##|##boolean##|(% style="text-align:center" %)N|##true## or ##false##. Set this to ##true## if you want to create a recurrenceToken for future use Recurring purchases (subscription payments).
218 +|##userAgent##|##string##|(% style="text-align:center" %)Y|The user agent reference of the consumer's browser - [[see user agent definition>>https://en.wikipedia.org/wiki/User_agent]]
219 +|##language##|##string##|(% style="text-align:center" %)Y|##nb-NO##, ##sv-SE## or ##en-US##.
220 +|##urls.hostUrl##|##array##|(% style="text-align:center" %)N|The array of URLs valid for embedding of PayEx Hosted Views. If not supplied, view-operation will not be available.
221 +|##urls.completeUrl##|##string##|(% style="text-align:center" %)Y|The URL that PayEx will redirect back to when the payment page is completed.
222 +|##urls.cancelUrl##|##string##|(% style="text-align:center" %)N|The URI to redirect the payer to if the payment is canceled. Only used in redirect scenarios. Can not be used simultaneously with ##paymentUrl##; only ##cancelUrl## or ##paymentUrl## can be used, not both.
223 +|##urls.paymentUrl##|##string##|(% style="text-align:center" %)N|The URI that PayEx will redirect back to when the ##view-operation## needs to be loaded, to inspect and act on the current status of the payment. Only used in hosted views. If both cancelUrl and paymentUrl is sent, the paymentUrl will used.
224 +|##urls.callbackUrl##|##string##|(% style="text-align:center" %)N|The URL that PayEx will perform an HTTP ##POST## against every time a transaction is created on the payment. See [[callback>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HCallback"]] for details.
225 +|##urls.logoUrl##|##string##|(% style="text-align:center" %)N|The URL that will be used for showing the customer logo. Must be a picture with maximum 50px height and 400px width. Require https.
226 +|##urls.termsOfServiceUrl##|##string##|(% style="text-align:center" %)N|A URL that contains your terms and conditions for the payment, to be linked on the payment page. Require https.
227 +|##payeeInfo.payeeId##|##string##|(% style="text-align:center" %)Y|This is the unique id that identifies this payee (like merchant) set by PayEx.
228 +|##payeeInfo.payeeReference##|##string(30*)##|(% style="text-align:center" %)Y|A unique reference from the merchant system. It is set per operation to ensure an exactly-once delivery of a transactional operation. See [[##payeeReference##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HPayeeReference"]] for details.
229 +|##payeeInfo.payeeName##|##string##|(% style="text-align:center" %)N|The payee name (like merchant name) that will be displayed to consumer when redirected to PayEx.
230 +|##payeeInfo.productCategory##|##string##|(% style="text-align:center" %)N|A product category or number sent in from the payee/merchant. This is not validated by PayEx, but will be passed through the payment process and may be used in the settlement process.
231 +|##payeeInfo.orderReference##|##String(50)##|(% style="text-align:center" %)N|The order reference should reflect the order reference found in the merchant's systems.
232 +|##payeeInfo.subsite##|##String(40)##|(% style="text-align:center" %)N|The subsite field can be used to perform split settlement on the payment. The subsites must be resolved with PayEx reconciliation before being used.
233 +|##metadata##|##object##|(% style="text-align:center" %)N|The keys and values that should be associated with the payment. Can be additional identifiers and data you want to associate with the payment.
234 +|##cardholder.firstName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set) If buyer is a company, use only firstName for companyName.
235 +|##cardholder.lastName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set) If buyer is a company, use only firstName for companyName.
236 +|##cardholder.email##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
237 +|##cardholder.msisdn##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
238 +|##cardholder.homePhoneNumber##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
239 +|##cardholder.workPhoneNumber##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
240 +|##cardholder.shippingAddress.firstName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
241 +|##cardholder.shippingAddress.lastName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
242 +|##cardholder.shippingAddress.email##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
243 +|##cardholder.shippingAddress.msisdn##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
244 +|##cardholder.shippingAddress.streetAddress##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
245 +|##cardholder.shippingAddress.coAddress##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
246 +|##cardholder.shippingAddress.city##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
247 +|##cardholder.shippingAddress.zipCode##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
248 +|##cardholder.shippingAddress.countryCode##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
249 +|##cardholder.billingAddress.firstName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set) If buyer is a company, use only firstName for companyName.
250 +|##cardholder.billingAddress.lastName##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set) If buyer is a company, use only firstName for companyName.
251 +|##cardholder.billingAddress.email##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
252 +|##cardholder.billingAddress.msisdn##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
253 +|##cardholder.billingAddress.streetAddress##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
254 +|##cardholder.billingAddress.coAddress##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
255 +|##cardholder.billingAddress.city##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
256 +|##cardholder.billingAddress.zipCode##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
257 +|##cardholder.billingAddress.countryCode##|##string##|(% style="text-align:center" %)N|Optional (increased chance for frictionless flow if set)
258 +|##cardholder.accountInfo##|##object##|(% style="text-align:center" %)N|(((
259 +Optional (increased chance for frictionless flow if set)
260 +
261 +If cardholder is known by merchant and have some kind of registered user then these fields can be set.
262 +)))
263 +|##cardholder.accountInfo.accountAgeIndicator##|##string##|(% style="text-align:center" %)N|(((
264 +Optional (increased chance for frictionless flow if set)
265 +
266 +Indicates the length of time that the payments account was enrolled in the cardholder's account with merchant.
267 +##01## (No account, guest)
268 +##02## (Created during transaction)
269 +##03## (Less than 30 days)
270 +##04## (30-60 days)
271 +##05## (More than 60 days)
272 +)))
273 +|##cardholder.accountInfo.accountChangeIndicator##|##string##|(% style="text-align:center" %)N|(((
274 +Optional (increased chance for frictionless flow if set)
275 +
276 +Length of time since the cardholder's account information with the merchant was changed. Including billing etc.
277 +##01## (Changed during transaction)
278 +##02## (Less than 30 days)
279 +##03## (30-60 days)
280 +##04## (More than 60 days)
281 +)))
282 +|##cardholder.accountInfo.accountPwdChangeIndicator##|##string##|(% style="text-align:center" %)N|(((
283 +Optional (increased chance for frictionless flow if set)
284 +
285 +Indicates the length of time since the cardholder's account with the merchant had a password change or account reset.
286 +##01## (No change)
287 +##02## (Changed during transaction)
288 +##03## (Less than 30 days)
289 +##04## (30-60 days)
290 +##05## (More than 60 days)
291 +)))
292 +|##cardholder.accountInfo.shippingAddressUsageIndicator##|##string##|(% style="text-align:center" %)N|(((
293 +Optional (increased chance for frictionless flow if set)
294 +
295 +Indicates when the shipping address used for this transaction was first used with the merchant.
296 +##01## (This transaction)
297 +##02## (Less than 30 days)
298 +##03## (30-60 days)
299 +##04## (More than 60 days)
300 +)))
301 +|##cardholder.accountInfo.shippingNameIndicator##|##string##|(% style="text-align:center" %)N|(((
302 +Optional (increased chance for frictionless flow if set)
303 +
304 +Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction.
305 +##01## (Account name identical to shipping name)
306 +##02## (Account name different than shipping name)
307 +)))
308 +|##cardholder.accountInfo.suspiciousAccountActivity##|##string##|(% style="text-align:center" %)N|(((
309 +Optional (increased chance for frictionless flow if set)
310 +
311 +Indicates whether merchant has experienced suspicious activity (including previous fraud) on the cardholder account.
312 +##01## (No suspicious activity has been observed)
313 +##02## (Suspicious activity has been observed)
314 +)))
315 +|##cardholder.accountInfo.addressMatchIndicator##|##boolean##|(% style="text-align:center" %)N|(((
316 +Optional (increased chance for frictionless flow if set)
317 +
318 +Allows the 3DS Requestor to indicate to the ACS whether the cardholder’s billing and shipping address are the same.
319 +)))
320 +|##riskIndicator.deliveryEmailAddress##|##string##|(% style="text-align:center" %)N|(((
321 +Optional (increased chance for frictionless flow if set)
322 +
323 +For electronic delivery, the email address to which the merchandise was delivered.
324 +)))
325 +|##riskIndicator.deliveryTimeFrameIndicator##|##string##|(% style="text-align:center" %)N|(((
326 +Optional (increased chance for frictionless flow if set)
327 +
328 +Indicates the merchandise delivery timeframe.
329 +##01## (Electronic Delivery)
330 +##02## (Same day shipping)
331 +##03## (Overnight shipping)
332 +##04## (Two-day or more shipping)
333 +)))
334 +|##riskIndicator.preOrderDate##|##string##|(% style="text-align:center" %)N|(((
335 +Optional (increased chance for frictionless flow if set)
336 +
337 +For a pre-ordered purchase. The expected date that the merchandise will be available.
338 +FORMAT: ##"YYYYMMDD"##
339 +)))
340 +|##riskIndicator.preOrderPurchaseIndicator##|##string##|(% style="text-align:center" %)N|(((
341 +Optional (increased chance for frictionless flow if set)
342 +
343 +Indicates whether Cardholder is placing an order for merchandise with a future availability or release date.
344 +##01## (Merchandise available)
345 +##02## (Future availability)
346 +)))
347 +|##riskIndicator.shipIndicator##|##string##|(% style="text-align:center" %)N|(((
348 +Optional (increased chance for frictionless flow if set)
349 +
350 +Indicates shipping method chosen for the transaction.
351 +##01## (Ship to cardholder's billing address)
352 +##02## (Ship to another verified address on file with merchant)
353 +##03## (Ship to address that is different than cardholder's billing address)
354 +##04## (Ship to Store / Pick-up at local store. Store address shall be populated in shipping address fields)
355 +##05## (Digital goods, includes online services, electronic giftcards and redemption codes)
356 +##06## (Travel and Event tickets, not shipped)
357 +##07## (Other, e.g. gaming, digital service)
358 +)))
359 +|##riskIndicator.giftCardPurchase##|##boolean##|(% style="text-align:center" %)N|(((
360 +Optional (increased chance for frictionless flow if set)
361 +
362 +##true## if this is a purchase of a gift card.
363 +)))
364 +|##riskIndicator.reOrderPurchaseIndicator##|##string##|(% style="text-align:center" %)N|(((
365 +Optional (increased chance for frictionless flow if set)
366 +
367 +Indicates whether Cardholder is placing an order for merchandise with a future availability or release date.
368 +##01## (Merchandise available)
369 +##02## (Future availability)
370 +)))
371 +|##riskIndicator.pickUpAddress##|##object##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
372 +|##riskIndicator.pickUpAddress.name##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
373 +|##riskIndicator.pickUpAddress.streetAddress##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
374 +|##riskIndicator.pickUpAddress.coAddress##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
375 +|##riskIndicator.pickUpAddress.city##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
376 +|##riskIndicator.pickUpAddress.zipCode##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
377 +|##riskIndicator.pickUpAddress.countryCode##|##string##|(% style="text-align:center" %)N|If shipIndicator set to 4, then prefil this.
378 +|##creditCard.rejectDebitCards##|##boolean##|(% style="text-align:center" %)N|##true## if debit cards should be declined; otherwise ##false ##per default. Default value is set by PayEx and can be changed at your request.
379 +|##creditCard.rejectCreditCards##|##boolean##|(% style="text-align:center" %)N|##true## if credit cards should be declined; otherwise ##false ##per default. Default value is set by PayEx and can be changed at your request.
380 +|##creditCard.rejectConsumerCards##|##boolean##|(% style="text-align:center" %)N|##true## if consumer cards should be declined; otherwise ##false ##per default. Default value is set by PayEx and can be changed at your request.
381 +|##creditCard.rejectCorporateCards##|##boolean##|(% style="text-align:center" %)N|##true## if corporate cards should be declined; otherwise ##false ##per default. Default value is set by PayEx and can be changed at your request.
382 +
383 +{{code language="http" title="**Response**"}}
384 +HTTP/1.1 200 OK
385 +Content-Type: application/json
386 +
387 +{
388 + "payment": {
389 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
390 + "number": 1234567890,
391 + "instrument": "CreditCard",
392 + "created": "2016-09-14T13:21:29.3182115Z",
393 + "updated": "2016-09-14T13:21:57.6627579Z",
394 + "state": "Ready",
395 + "operation": "Purchase",
396 + "intent": "Authorization",
397 + "currency": "SEK",
398 + "amount": 1500,
399 + "remainingCaptureAmount": 1500,
400 + "remainingCancellationAmount": 1500,
401 + "remainingReversalAmount": 0,
402 + "description": "Test Purchase",
403 + "payerReference": "AB1234",
404 + "initiatingSystemUserAgent": "PostmanRuntime/3.0.1",
405 + "userAgent": "Mozilla/5.0...",
406 + "language": "sv-SE",
407 + "prices": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/prices" },
408 + "transactions": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions" },
409 + "authorizations": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations" },
410 + "captures": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures" },
411 + "reversals": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversals" },
412 + "cancellations": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations" },
413 + "urls" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/urls" },
414 + "payeeInfo" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/payeeInfo" },
415 + "settings": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/settings" }
416 + },
417 + "operations": [
418 + {
419 + "href": "https://api.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
420 + "rel": "update-payment-abort",
421 + "method": "PATCH",
422 + "contentType": "application/json"
423 + },
424 + {
425 + "href": "https://ecom.payex.com/creditcard/payments/authorize/123456123412341234123456789012",
426 + "rel": "redirect-authorization",
427 + "method": "GET",
428 + "contentType": "text/html"
429 + },
430 + {
431 + "method": "GET",
432 + "href": "https://ecom.dev.payex.com/creditcard/core/scripts/client/px.creditcard.client.js?token=123456123412341234123456789012",
433 + "rel": "view-authorization",
434 + "contentType": "application/javascript"
435 + }
436 + ]
437 +}
438 +
439 +{{/code}}
440 +
441 +=== Recur ===
442 +
443 +A ##Recur## payment is a payment that references a ##recurrenceToken## created through a previous payment in order to charge the same card. Use the [[##expand##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HExpansion"]] request parameter to get a response that includes one or more expanded sub-resources inlined.
444 +
445 +{{code language="http" title="**Request**"}}
446 +
447 +POST /psp/creditcard/payments HTTP/1.1
448 +Host: api.payex.com
449 +Authorization: Bearer <MerchantToken>
450 +Content-Type: application/json
451 +
452 +{
453 + "payment": {
454 + "operation": "Recur",
455 + "intent": "Authorization|AutoCapture",
456 + "recurrenceToken": "5adc265f-f87f-4313-577e-08d3dca1a26c",
457 + "currency": "NOK",
458 + "amount": 1500,
459 + "vatAmount": 0,
460 + "description": "Test Recurrence",
461 + "userAgent": "Mozilla/5.0...",
462 + "language": "nb-NO",
463 + "urls": {
464 + "callbackUrl": "http://test-dummy.net/payment-callback"
465 + },
466 + "payeeInfo": {
467 + "payeeId": "12345678-1234-1234-1234-123456789012",
468 + "payeeReference": "CD1234",
469 + "payeeName": "Merchant1",
470 + "productCategory": "A123",
471 + "orderReference": "or-12456",
472 + "subsite": "MySubsite"
473 + }
474 + }
475 +}
476 +{{/code}}
477 +
478 +=== Payout ===
479 +
480 +A ##Payout## payment is a deposit directly to credit card. This options is only valid as part of the [[Payout to Card>>doc:Main.ecommerce.payex-payment-instruments.card-payments.payout-to-card.WebHome]] add-on service. Use the [[##expand##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HExpansion"]] request parameter to get a response that includes one or more expanded sub-resources inlined.
481 +
482 +{{code language="http" title="**Request**"}}
483 +
484 +POST /psp/creditcard/payments HTTP/1.1
485 +Host: api.payex.com
486 +Authorization: Bearer <MerchantToken>
487 +Content-Type: application/json
488 +
489 +{
490 + "payment": {
491 + "operation": "Payout",
492 + "intent": "AutoCapture",
493 + "paymentToken": "5adc265f-f87f-4313-577e-08d3dca1a26c",
494 + "currency": "NOK",
495 + "amount": 1500,
496 + "vatAmount": 0,
497 + "description": "Test Payout",
498 + "userAgent": "Mozilla/5.0",
499 + "language": "nb-NO",
500 + "urls": {
501 + "callbackUrl": "http://test-dummy.net/payment-callback"
502 + },
503 + "payeeInfo": {
504 + "payeeId": "12345678-1234-1234-1234-123456789012",
505 + "payeeReference": "CD1234",
506 + "payeeName": "Merchant1",
507 + "productCategory": "A123",
508 + "orderReference": "or-12456",
509 + "subsite": "MySubsite"
510 + }
511 + }
512 +}
513 +{{/code}}
514 +
515 +{{code language="http" title="**Response**"}}
516 +
517 +HTTP/1.1 200 OK
518 +Content-Type: application/json
519 +
520 +{
521 + "payment": {
522 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
523 + "number": 1234567890,
524 + "created": "2016-09-14T13:21:29.3182115Z",
525 + "updated": "2016-09-14T13:21:57.6627579Z",
526 + "state": "Ready",
527 + "operation": "Payout",
528 + "currency": "NOK",
529 + "amount": 1500,
530 + "remainingCaptureAmount": 1500,
531 + "remainingCancellationAmount": 1500,
532 + "remainingReversalAmount": 0,
533 + "description": "Test Recurrence",
534 + "initiatingSystemUserAgent": "PostmanRuntime/3.0.1",
535 + "userAgent": "Mozilla/5.0...",
536 + "language": "nb-NO",
537 + "paymentToken": "5adc265f-f87f-4313-577e-08d3dca1a26c",
538 + "prices": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/prices" },
539 + "transactions": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions" },
540 + "authorizations": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations" },
541 + "captures": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures" },
542 + "reversals": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversals" },
543 + "cancellations": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations" },
544 + "urls" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/urls" },
545 + "payeeInfo" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/payeeInfo" },
546 + "settings": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/settings" }
547 + }
548 +}
549 +{{/code}}
550 +
551 +=== Verify ===
552 +
553 +A ##Verify## payment lets you post verifications to confirm the validity of card information, without reserving or charging any amount. This option is often used to initiate a recurring payment flow where you do not want to charge the consumer right away. Please note that all boolean credit card attributes involving rejection of certain card types are optional and set on contract level. Use the [[##expand##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HExpansion"]] request parameter to get a response that includes one or more expanded sub-resources inlined.
554 +
555 +{{code language="http" title="**Request**"}}
556 +
557 +POST /psp/creditcard/payments HTTP/1.1
558 +Host: api.payex.com
559 +Authorization: Bearer <MerchantToken>
560 +Content-Type: application/json
561 +
562 +{
563 + "payment": {
564 + "operation": "Verify",
565 + "currency": "NOK",
566 + "description": "Test Verification",
567 + "payerReference": "AB1234",
568 + "userAgent": "Mozilla/5.0...",
569 + "language": "nb-NO",
570 + "generatePaymentToken": true,
571 + "generateRecurrenceToken": false,
572 + "urls": {
573 + "hostUrls": ["http://test-dummy.net"],
574 + "completeUrl": "http://test-dummy.net/payment-completed",
575 + "cancelUrl": "http://test-dummy.net/payment-canceled",
576 + "paymentUrl": "http://example.com/perform-payment",
577 + "logoUrl": "https://test-dummy.net/payment-logo.png",
578 + "termsOfServiceUrl": "https://test-dummy.net/payment-terms.html"
579 + },
580 + "payeeInfo": {
581 + "payeeId": "12345678-1234-1234-1234-123456789012",
582 + "payeeReference": "CD1234",
583 + "payeeName": "Merchant1",
584 + "productCategory": "A123",
585 + "orderReference": "or-12456",
586 + "subsite": "MySubsite"
587 + }
588 + },
589 + "creditCard": {
590 + "rejectCreditCards": false,
591 + "rejectDebitCards": false,
592 + "rejectConsumerCards": false,
593 + "rejectCorporateCards": false
594 + }
595 +}
596 +{{/code}}
597 +
598 +{{code language="http" title="**Response**"}}
599 +
600 +HTTP/1.1 200 OK
601 +Content-Type: application/json
602 +
603 +{
604 + "payment": {
605 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
606 + "number": 1234567890,
607 + "created": "2016-09-14T13:21:29.3182115Z",
608 + "updated": "2016-09-14T13:21:57.6627579Z",
609 + "operation": "Verify",
610 + "state": "Ready",
611 + "currency": "NOK",
612 + "amount": 0,
613 + "description": "Test Verification",
614 + "payerReference": "AB1234",
615 + "initiatingSystemUserAgent": "PostmanRuntime/3.0.1",
616 + "userAgent": "Mozilla/5.0",
617 + "language": "nb-NO",
618 + "transactions": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions" },
619 + "verifications": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications" },
620 + "urls" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/urls" },
621 + "payeeInfo" : { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/payeeInfo" },
622 + "settings": { "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/settings" }
623 + },
624 + "operations": [
625 + {
626 + "href": "https://api.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
627 + "rel": "update-payment-abort",
628 + "method": "PATCH",
629 + "contentType": "application/json"
630 + },
631 + {
632 + "href": "https://ecom.payex.com/creditcard/payments/verification/123456123412341234123456789012",
633 + "rel": "redirect-verification",
634 + "method": "GET",
635 + "contentType": "application/json"
636 + },
637 + {
638 + "method": "GET",
639 + "href": "https://ecom.dev.payex.com/creditcard/core/scripts/client/px.creditcard.client.js?token=123456123412341234123456789012",
640 + "rel": "view-verification",
641 + "contentType": "application/javascript"
642 + },
643 +
644 + {
645 + "method": "POST",
646 + "href": "https://ecom.dev.payex.com/psp/creditcard/confined/payments/{paymentId:guid}/verifications",
647 + "rel": "direct-verification",
648 + "contentType": "application/json"
649 + }
650 +
651 + ]
652 +}
653 +{{/code}}
654 +
655 +== Operations ==
656 +
657 +When a payment resource is created and during its lifetime, it will have a set of operations that can be performed on it. Which operations are available will vary depending on the state of the payment resource, what the access token is authorized to do, etc. A list of possible operations and their explanation is given below.
658 +
659 +{{code language="json" title="**Operations**"}}
660 +{
661 + "payment": {},
662 + "operations": [
663 + {
664 + "href": "http://api.externalintegration.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
665 + "rel": "update-payment-abort",
666 + "method": "PATCH"
667 + },
668 + {
669 + "href": "https://ecom.externalintegration.payex.com/creditcard/payments/authorize/123456123412341234123456789012",
670 + "rel": "redirect-authorization",
671 + "method": "GET"
672 + },
673 + {
674 + "method": "GET",
675 + "href": "https://ecom.externalintegration.payex.com//creditcard/core/scripts/client/px.creditcard.client.js?token=123456123412341234123456789012",
676 + "rel": "view-authorization",
677 + "contentType": "application/javascript"
678 + },
679 + {
680 + "href": "https://api-ecommerce.externalintegration.payex.com/creditcard/confined/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations",
681 + "rel": "direct-authorization",
682 + "method": "POST"
683 + },
684 + {
685 + "href": "https://api.externalintegration.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures",
686 + "rel": "create-capture",
687 + "method": "POST"
688 + },
689 + {
690 + "href": "https://api.externalintegration.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations",
691 + "rel": "create-cancellation",
692 + "method": "POST"
693 + },
694 + {
695 + "href": "https://api.externalintegration.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversals",
696 + "rel": "create-reversal",
697 + "method": "POST"
698 + },
699 + {
700 + "href": "https://api.externalintegration.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/60ed0025-f75a-4240-8872-e8c08e6d7544",
701 + "rel": "update-authorization-finalize",
702 + "method": "PATCH"
703 + },
704 + {
705 + "href": "https://ecom.externalintegration.payex.com/creditcard/payments/verification/123456123412341234123456789012",
706 + "rel": "redirect-verification",
707 + "method": "GET",
708 + },
709 + {
710 + "method": "GET",
711 + "href": "https://ecom.externalintegration.payex.com//creditcard/core/scripts/client/px.creditcard.client.js?token=123456123412341234123456789012",
712 + "rel": "view-verification",
713 + },
714 + {
715 + "method": "POST",
716 + "href": "https://ecom.externalintegration.payex.com/psp/creditcard/confined/payments/{paymentId:guid}/verifications",
717 + "rel": "direct-verification",
718 + }
719 + ]
720 +}
721 +{{/code}}
722 +
723 +**Properties**
724 +
725 +(% class="table-bordered table-striped" %)
726 +|=Property|=Description
727 +|##href##|The target URI to perform the operation against.
728 +|##rel##|The name of the relation the operation has to the current resource.
729 +|##method##|The HTTP method to use when performing the operation.
730 +
731 +The operations should be performed as described in each response and not as described here in the documentation. Always use the {{code}}href{{/code}} and {{code}}method{{/code}} as specified in the response by finding the appropriate operation based on its {{code}}rel{{/code}} value. The only thing that should be hard coded in the client is the value of the {{code}}rel{{/code}} and the request that will be sent in the HTTP body of the request for the given operation.
732 +
733 +**Operations**
734 +
735 +(% class="table-bordered table-striped" %)
736 +|=Operation |=Description
737 +|##update-payment-abort##|[[Aborts>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HAbort"]] the payment before any financial transactions are performed.
738 +|##redirect-authorization##|Contains the URI that is used to redirect the consumer to the PayEx Payment Pages containing the card authorization UI.
739 +|##view-authorization##|Contains the JavaScript ##href## that is used to embed the card authorization UI directly on the webshop/merchant site
740 +|##direct-authorization##|Used to create a card authorization without the need to redirect consumer (requires PCI-DSS compliance for customer).
741 +|##create-capture##|Creates a [[##capture## transaction>>doc:||anchor="HCaptures"]].
742 +|##create-cancellation##|Creates a [[##cancellation## transaction>>doc:||anchor="HCancellations"]].
743 +|##create-reversal##|Creates a [[##reversal## transaction>>doc:||anchor="HReversals"]].
744 +|##update-authorization-finalize##|Used to [[##finalize##>>doc:||anchor="HFinalize"]] an authorization.
745 +|##redirect-verification##|Contains the URI that redirect the consumer to the PayEx Payment Pages containing the card verification UI. It is only applicable when using the [[##verify##>>doc:||anchor="HVerify"]] operation.
746 +|##view-verification##|Contains the URI that is used redirect the consumer to the PayEx Payment Pages containing the card verification UI.
747 +|##direct-verification##|Used to verify directly without redirection. It is only applicable, if the payee is PCI approved, when using the [[##verify##>>doc:||anchor="HFinalize"]] operation.
748 +
749 +== Card transactions ==
750 +
751 +All card specific transactions are described below. Read more about the general transaction resource [[here>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
752 +
753 +=== Verifications ===
754 +
755 +The {{code}}verifications{{/code}} resource contains information about verfication transactions made on a payment with the operation set to ##Verify##.
756 +
757 +{{code language="http" title="**Request**"}}
758 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications HTTP/1.1
759 +Host: api.payex.com
760 +Authorization: Bearer <MerchantToken>
761 +Content-Type: application/json
762 +{{/code}}
763 +
764 +{{code language="http" title="**Response**"}}
765 +
766 +HTTP/1.1 200 OK
767 +Content-Type: application/json
768 +
769 +{
770 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
771 + "verifications": {
772 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications",
773 + "verificationList": [
774 + {
775 + "direct": false,
776 + "paymentToken": "12345678-1234-1234-1234-123456789012",
777 + "recurrenceToken": "12345678-1234-1234-1234-123456789013",
778 + "maskedPan": "123456xxxxxx1234",
779 + "expiryDate": "mm/yyyy",
780 + "panToken": "12345678-1234-1234-1234-123456789012",
781 + "cardBrand": "Visa",
782 + "cardType": "Credit",
783 + "issuingBank": "UTL MAESTRO",
784 + "countryCode": "999",
785 + "acquirerTransactionType": "3DSECURE",
786 + "issuerAuthorizationApprovalCode": "397136",
787 + "acquirerStan": "39736",
788 + "acquirerTerminalId": "39",
789 + "acquirerTransactionTime": "2017-08-29T13:42:18Z",
790 + "authenticationStatus": "Y",
791 + "nonPaymentToken": "string",
792 + "externalNonPaymentToken": "string",
793 + "externalSiteId": "string",
794 + "transactionInitiator": "CARDHOLDER",
795 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications/12345678-1234-1234-1234-123456789012",
796 + "transaction": {
797 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
798 + "created": "2019-08-13T10:22:05.7532436Z",
799 + "updated": "2019-08-13T10:22:11.2502878Z",
800 + "type": "Verification",
801 + "state": "Initialized|Completed|Failed",
802 + "number": 1234567890,
803 + "amount": 1000,
804 + "vatAmount": 2500,
805 + "description": "Test transaction",
806 + "payeeReference": "AH123456",
807 + "failedReason": "ExternalResponseError",
808 + "failedActivityName": "Verify",
809 + "failedErrorCode": "REJECTED_BY_ACQUIRER",
810 + "failedErrorDescription": "unknown error, response-code: 51",
811 + "isOperational": false,
812 + "problem": {
813 + "type": "https://api.payex.com/psp/errordetail/creditcard/acquirererror",
814 + "title": "Operation failed",
815 + "status": 403,
816 + "detail": "Unable to complete Authorization transaction, look at problem node!",
817 + "problems": [
818 + {
819 + "name": "ExternalResponse",
820 + "description": "REJECTED_BY_ACQUIRER-unknown error, response-code: 51"
821 + }
822 + ]
823 + },
824 + "operations": []
825 + }
826 + }
827 + ]
828 + }
829 +}
830 +{{/code}}
831 +
832 +**Properties**
833 +
834 +(% class="table-bordered table-striped" %)
835 +|=Property|=Data type|=Description
836 +|##payment##|##string##|The relative URI of the payment this verification transactions resource belongs to.
837 +|##verifications.id##|##string##|The relative URI of the current verification transactions resource.
838 +|##verifications.verificationList##|##array##|The array of verification transaction objects.
839 +|##verifications.verificationList[]##|##object##|The verification transaction object described in the (% style="font-family:monospace" %)verification(%%) resource below.
840 +
841 +The {{code}}verifications{{/code}} resource contains information about an verification transaction made on a specific payment.
842 +
843 +{{code language="http" title="**Request**"}}
844 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications/12345678-1234-1234-1234-123456789012 HTTP/1.1
845 +Host: api.payex.com
846 +Authorization: Bearer <MerchantToken>
847 +Content-Type: application/json
848 +{{/code}}
849 +
850 +{{code language="http" title="**Response**"}}
851 +
852 +HTTP/1.1 200 OK
853 +Content-Type: application/json
854 +
855 +{
856 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
857 + "verification": {
858 + "direct": false,
859 + "paymentToken": "12345678-1234-1234-1234-123456789012",
860 + "recurrenceToken": "12345678-1234-1234-1234-123456789013",
861 + "maskedPan": "123456xxxxxx1234",
862 + "expiryDate": "mm/yyyy",
863 + "panToken": "12345678-1234-1234-1234-123456789012",
864 + "cardBrand": "Visa",
865 + "cardType": "Credit",
866 + "issuingBank": "UTL MAESTRO",
867 + "countryCode": "999",
868 + "acquirerTransactionType": "3DSECURE",
869 + "issuerAuthorizationApprovalCode": "397136",
870 + "acquirerStan": "39736",
871 + "acquirerTerminalId": "39",
872 + "acquirerTransactionTime": "2017-08-29T13:42:18Z",
873 + "authenticationStatus": "Y",
874 + "nonPaymentToken": "string",
875 + "externalNonPaymentToken": "string",
876 + "externalSiteId": "string",
877 + "transactionInitiator": "CARDHOLDER",
878 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications/12345678-1234-1234-1234-123456789012",
879 + "transaction": {
880 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
881 + "created": "2019-08-13T10:22:05.7532436Z",
882 + "updated": "2019-08-13T10:22:11.2502878Z",
883 + "type": "Verification",
884 + "state": "Initialized|Completed|Failed",
885 + "number": 1234567890,
886 + "amount": 1000,
887 + "vatAmount": 2500,
888 + "description": "Test transaction",
889 + "payeeReference": "AH123456",
890 + "failedReason": "ExternalResponseError",
891 + "failedActivityName": "Verify",
892 + "failedErrorCode": "REJECTED_BY_ACQUIRER",
893 + "failedErrorDescription": "unknown error, response-code: 51",
894 + "isOperational": false,
895 + "problem": {
896 + "type": "https://api.payex.com/psp/errordetail/creditcard/acquirererror",
897 + "title": "Operation failed",
898 + "status": 403,
899 + "detail": "Unable to complete Authorization transaction, look at problem node!",
900 + "problems": [
901 + {
902 + "name": "ExternalResponse",
903 + "description": "REJECTED_BY_ACQUIRER-unknown error, response-code: 51"
904 + }
905 + ]
906 + },
907 + "operations": []
908 + }
909 + }
910 +}
911 +{{/code}}
912 +
913 +**Properties**
914 +
915 +(% class="table-bordered table-striped" %)
916 +|=Property|=Data type|=Description
917 +|##payment##|##string##|The relative URI of the payment this verification transaction resource belongs to.
918 +|##verification.id##|##string##|The relative URI of the current authorization transaction resource.
919 +|##verification.cardBrand##|##string##|##Visa##, ##MasterCard##, etc. The brand of the card.
920 +|##verification.cardType##|##string##|##Credit Card## or ##Debit Card##. Indicates the type of card used for the verification.
921 +|##verification.paymentToken##|##string##|The payment token created for the card used in the verification process.
922 +|##verification.recurrenceToken##|##string##|The recurrence token created for the card used in the verification process.
923 +|##verification.maskedPan##|##string##|The masked PAN number of the card.
924 +|##verification.expiryDate##|##string##|The month and year of when the card expires.
925 +|##verification.panToken##|##string##|The token representing the specific PAN of the card.
926 +|##verification.transaction##|##Object##|The object representation of the generic [[##transaction## resource>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
927 +
928 +==== Create verification transaction ====
929 +
930 +The {{code}}direct-verification{{/code}} operation creates an verification transaction directly whilst the {{code}}redirect-verification{{/code}}operation redirects the consumer to PayEx Payment pages where the payment is verified.
931 +
932 +{{code language="http" title="**Request**"}}
933 +POST /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/verifications HTTP/1.1
934 +Host: api.payex.com
935 +Authorization: Bearer <MerchantToken>
936 +Content-Type: application/json
937 +
938 +{
939 + "transaction": {
940 + "creditCardIssuer": "Visa|Mc|..."
941 + }
942 +}
943 +
944 +{{/code}}
945 +
946 +**Properties**
947 +
948 +(% class="table-bordered table-striped" %)
949 +|=Property|=Data type|=Required|=Description
950 +|##transaction.cardNumber##|##string##|Y|Primary Account Number (PAN) of the card, printed on the face of the card.
951 +|##transaction.cardExpiryMonth##|##integer##|Y|Expiry month of the card, printed on the face of the card.
952 +|##transaction.cardExpiryYear##|##integer##|Y|Expiry year of the card, printed on the face of the card.
953 +|##transaction.cardVerificationCode##|##string##|N|Card verification code (CVC/CVV/CVC2), usually printed on the back of the card.
954 +|##transaction.cardholderName##|##string##|N|Name of the card holder, usually printed on the face of the card.
955 +
956 +**Response**
957 +
958 +The {{code}}verification{{/code}} resource contains information about an verification transaction made towards a payment, as previously described.
959 +
960 +=== Authorizations ===
961 +
962 +The {{code}}authorizations{{/code}} resource contains information about authorization transactions made on a specific payment.
963 +
964 +{{code language="http" title="**Request**"}}
965 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations HTTP/1.1
966 +Host: api.payex.com
967 +Authorization: Bearer <MerchantToken>
968 +Content-Type: application/json
969 +{{/code}}
970 +
971 +{{code language="http" title="**Response**"}}
972 +
973 +HTTP/1.1 200 OK
974 +Content-Type: application/json
975 +
976 +{
977 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
978 + "authorizations": {
979 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations",
980 + "authorizationList": [
981 + {
982 + "direct": false,
983 + "paymentToken": "12345678-1234-1234-1234-123456789012",
984 + "recurrenceToken": "12345678-1234-1234-1234-123456789013",
985 + "maskedPan": "123456xxxxxx1234",
986 + "expiryDate": "mm/yyyy",
987 + "panToken": "12345678-1234-1234-1234-123456789012",
988 + "cardBrand": "Visa",
989 + "cardType": "Credit",
990 + "issuingBank": "UTL MAESTRO",
991 + "countryCode": "999",
992 + "acquirerTransactionType": "3DSECURE",
993 + "issuerAuthorizationApprovalCode": "397136",
994 + "acquirerStan": "39736",
995 + "acquirerTerminalId": "39",
996 + "acquirerTransactionTime": "2017-08-29T13:42:18Z",
997 + "authenticationStatus": "Y",
998 + "nonPaymentToken": "string",
999 + "externalNonPaymentToken": "string",
1000 + "externalSiteId": "string",
1001 + "transactionInitiator": "CARDHOLDER",
1002 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/12345678-1234-1234-1234-123456789012",
1003 + "transaction": {
1004 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1005 + "created": "2019-08-13T10:32:21.861621Z",
1006 + "updated": "2019-08-13T10:32:23.4271016Z",
1007 + "type": "Authorization",
1008 + "state": "Failed",
1009 + "number": 1234567890,
1010 + "amount": 1000,
1011 + "vatAmount": 2500,
1012 + "description": "Test transaction",
1013 + "payeeReference": "AH123456",
1014 + "failedReason": "ExternalResponseError",
1015 + "failedActivityName": "Authorize",
1016 + "failedErrorCode": "REJECTED_BY_ACQUIRER",
1017 + "failedErrorDescription": "unknown error, response-code: 51",
1018 + "isOperational": false,
1019 + "problem": {
1020 + "type": "https://api.payex.com/psp/errordetail/creditcard/acquirererror",
1021 + "title": "Operation failed",
1022 + "status": 403,
1023 + "detail": "Unable to complete Authorization transaction, look at problem node!",
1024 + "problems": [
1025 + {
1026 + "name": "ExternalResponse",
1027 + "description": "REJECTED_BY_ACQUIRER-unknown error, response-code: 51"
1028 + }
1029 + ]
1030 + },
1031 + "operations": []
1032 + }
1033 + }
1034 + ]
1035 + }
1036 +}
1037 +{{/code}}
1038 +
1039 +**Properties**
1040 +
1041 +(% class="table-bordered table-striped" %)
1042 +|=Property|=Data type|=Description
1043 +|##payment##|##string##|The relative URI of the payment this authorization transactions resource belongs to.
1044 +|##authorizations.id##|##string##|The relative URI of the current authorization transactions resource.
1045 +|##authorizations.authorizationList##|##array##|The array of authorization transaction objects.
1046 +|##authorizations.authorizationList[]##|##object##|The authorization transaction object described in the ##authorization## resource below.
1047 +
1048 +The {{code}}authorization{{/code}} resource contains information about an authorization transaction made on a specific payment.
1049 +
1050 +{{code language="http" title="**Request**"}}
1051 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/12345678-1234-1234-1234-123456789012 HTTP/1.1
1052 +Host: api.payex.com
1053 +Authorization: Bearer <MerchantToken>
1054 +Content-Type: application/json
1055 +{{/code}}
1056 +
1057 +{{code language="http" title="**Response**"}}
1058 +
1059 +HTTP/1.1 200 OK
1060 +Content-Type: application/json
1061 +
1062 +{
1063 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1064 + "authorization": {
1065 + "direct": false,
1066 + "paymentToken": "12345678-1234-1234-1234-123456789012",
1067 + "recurrenceToken": "12345678-1234-1234-1234-123456789013",
1068 + "maskedPan": "123456xxxxxx1234",
1069 + "expiryDate": "mm/yyyy",
1070 + "panToken": "12345678-1234-1234-1234-123456789012",
1071 + "cardBrand": "Visa",
1072 + "cardType": "Credit",
1073 + "issuingBank": "UTL MAESTRO",
1074 + "countryCode": "999",
1075 + "acquirerTransactionType": "3DSECURE",
1076 + "issuerAuthorizationApprovalCode": "397136",
1077 + "acquirerStan": "39736",
1078 + "acquirerTerminalId": "39",
1079 + "acquirerTransactionTime": "2017-08-29T13:42:18Z",
1080 + "authenticationStatus": "Y",
1081 + "nonPaymentToken": "string",
1082 + "externalNonPaymentToken": "string",
1083 + "externalSiteId": "string",
1084 + "transactionInitiator": "CARDHOLDER",
1085 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/12345678-1234-1234-1234-123456789012",
1086 + "transaction": {
1087 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1088 + "created": "2019-08-13T10:32:21.861621Z",
1089 + "updated": "2019-08-13T10:32:23.4271016Z",
1090 + "type": "Authorization",
1091 + "state": "Failed",
1092 + "number": 1234567890,
1093 + "amount": 1000,
1094 + "vatAmount": 2500,
1095 + "description": "Test transaction",
1096 + "payeeReference": "AH123456",
1097 + "failedReason": "ExternalResponseError",
1098 + "failedActivityName": "Authorize",
1099 + "failedErrorCode": "REJECTED_BY_ACQUIRER",
1100 + "failedErrorDescription": "unknown error, response-code: 51",
1101 + "isOperational": false,
1102 + "problem": {
1103 + "type": "https://api.payex.com/psp/errordetail/creditcard/acquirererror",
1104 + "title": "Operation failed",
1105 + "status": 403,
1106 + "detail": "Unable to complete Authorization transaction, look at problem node!",
1107 + "problems": [
1108 + {
1109 + "name": "ExternalResponse",
1110 + "description": "REJECTED_BY_ACQUIRER-unknown error, response-code: 51"
1111 + }
1112 + ]
1113 + },
1114 + "operations": []
1115 + }
1116 + }
1117 +}
1118 +{{/code}}
1119 +
1120 +**Properties**
1121 +
1122 +(% class="table-bordered table-striped" %)
1123 +|=Property|=Data type|=Description
1124 +|##payment##|##string##|The relative URI of the payment this authorization transaction resource belongs to.
1125 +|##authorization.id##|##string##|The relative URI of the current authorization transaction resource.
1126 +|##authorization.paymentToken##|##string##|The payment token created for the card used in the authorization.
1127 +|##authorization.recurrenceToken##|##string##|The recurrence token created for the card used in the authorization.
1128 +|##authorization.maskedPan##|##string##|The masked PAN number of the card.
1129 +|##authorization.expireDate##|##string##|The month and year of when the card expires.
1130 +|##authorization.panToken##|##string##|The token representing the specific PAN of the card.
1131 +|##authorization.cardBrand##|##string##|##Visa##, ##MC##, etc. The brand of the card.
1132 +|##authorization.cardType##|##string##|##Credit Card## or ##Debit Card##. Indicates the type of card used for the authorization.
1133 +|##authorization.issuingBank##|##string##|The name of the bank that issued the card used for the authorization.
1134 +|##authorization.countryCode##|##string##|The country the card is issued in.
1135 +|##authorization.acquirerTransactionType##|##string##|##3DSECURE## or ##SSL##. Indicates the transaction type of the acquirer.
1136 +|##authorization.acquirerStan##|##string##|The System Trace Audit Number assigned by the acquirer to uniquely identify the transaction.
1137 +|##authorization.acquirerTerminalId##|##string##|The ID of the acquirer terminal.
1138 +|##authorization.acquirerTransactionTime##|##string##|The ISO-8601 date and time of the acquirer transaction.
1139 +|##authorization.issuerAuthorizationApprovalCode##|##string##|The issuer's six-digit code used to identify the approval for a specific authorization request.
1140 +|##authorization.authenticationStatus##|##string##|##Y##, ##A##, ##U## or ##N##. Indicates the status of the authentication.
1141 +|##authorization.transaction##|##object##|The object representation of the generic [[##transaction## resource>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
1142 +
1143 +==== Create authorization transaction ====
1144 +
1145 +The {{code}}direct-authorization{{/code}} operation creates an authorization transaction directly whilst the {{code}}redirect-authorization{{/code}}operation redirects the consumer to PayEx Payment pages where the payment is authorized.
1146 +
1147 +{{warning}}
1148 +**Note:** In order to use the {{code}}direct-authorization{{/code}} operation, the servers and application involved in retrieving and transferring the credit card number from the payer to PayEx needs to be [[PCI DSS>>https://www.pcisecuritystandards.org/]] certified.**
1149 +{{/warning}}
1150 +
1151 +{{code language="http" title="**Request**"}}
1152 +POST /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations HTTP/1.1
1153 +Host: api.payex.com
1154 +Authorization: Bearer <MerchantToken>
1155 +Content-Type: application/json
1156 +
1157 +{
1158 + "transaction": {
1159 + "cardNumber": "4925000000000004",
1160 + "cardExpiryMonth": 11,
1161 + "cardExpiryYear": 22,
1162 + "cardVerificationCode": "185",
1163 + "cardholderName": "John Hancock"
1164 + }
1165 +}
1166 +{{/code}}
1167 +
1168 +**Properties**
1169 +
1170 +(% class="table-bordered table-striped" %)
1171 +|=Property|=Data type|=Required|=Description
1172 +|##transaction.cardNumber##|##string##|Y|Primary Account Number (PAN) of the card, printed on the face of the card.
1173 +|##transaction.cardExpiryMonth##|##integer##|Y|Expiry month of the card, printed on the face of the card.
1174 +|##transaction.cardExpiryYear##|##integer##|Y|Expiry year of the card, printed on the face of the card.
1175 +|##transaction.cardVerificationCode##|##string##|N|Card verification code (CVC/CVV/CVC2), usually printed on the back of the card.
1176 +|##transaction.cardholderName##|##string##|N|Name of the card holder, usually printed on the face of the card.
1177 +
1178 +**Response**
1179 +
1180 +The {{code}}authorization{{/code}} resource contains information about an authorization transaction made towards a payment, as previously described.
1181 +
1182 +=== Captures ===
1183 +
1184 +The {{code}}captures{{/code}} resource list the capture transactions (one or more) on a specific payment.
1185 +
1186 +{{code language="http" title="**Request**"}}
1187 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures HTTP/1.1
1188 +Host: api.payex.com
1189 +Authorization: Bearer <MerchantToken>
1190 +Content-Type: application/json
1191 +{{/code}}
1192 +
1193 +(% class="box" %)
1194 +(((
1195 +(% style="margin:0in" %)
1196 +(% style="font-family:Calibri; font-size:11pt; font-weight:bold" %)**Response**
1197 +
1198 +(% style="margin:0in" %)
1199 +(% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**HTTP**(% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**/1.1 200 **(% style="color:#d2413a; font-family:Calibri; font-size:11pt; font-weight:bold" %)**OK**
1200 +
1201 +(% style="margin:0in" %)
1202 +(% style="color:#7d9029; font-family:Calibri; font-size:11pt" %)Content-Type(% style="color:#666666; font-family:Calibri; font-size:11pt" %):(% style="font-family:Calibri; font-size:11pt" %) application/json
1203 +
1204 +(% style="margin:0in" %)
1205 +(% style="font-family:Calibri; font-size:11pt" %)
1206 +
1207 +(% style="margin:0in" %)
1208 +(% style="font-family:Calibri; font-size:11pt" %){
1209 +
1210 +(% style="margin:0in" %)
1211 +(% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)** "payment"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c"**(% style="font-family:Calibri; font-size:11pt" %),
1212 +
1213 +(% style="margin:0in" %)
1214 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"captures"**(% style="font-family:Calibri; font-size:11pt" %): {
1215 +
1216 +(% style="margin:0in" %)
1217 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"id"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures"**(% style="font-family:Calibri; font-size:11pt" %),
1218 +
1219 +(% style="margin:0in" %)
1220 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"captureList"**(% style="font-family:Calibri; font-size:11pt" %): [{
1221 +
1222 +(% style="margin:0in" %)
1223 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"id"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures/12345678-1234-1234-1234-123456789012"**(% style="font-family:Calibri; font-size:11pt" %),
1224 +
1225 +(% style="margin:0in" %)
1226 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"transaction"**(% style="font-family:Calibri; font-size:11pt" %): {
1227 +
1228 +(% style="margin:0in" %)
1229 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"id"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012"**(% style="font-family:Calibri; font-size:11pt" %),
1230 +
1231 +(% style="margin:0in" %)
1232 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"created"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"2016-09-14T01:01:01.01Z"**(% style="font-family:Calibri; font-size:11pt" %),
1233 +
1234 +(% style="margin:0in" %)
1235 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"updated"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"2016-09-14T01:01:01.03Z"**(% style="font-family:Calibri; font-size:11pt" %),
1236 +
1237 +(% style="margin:0in" %)
1238 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"type"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Capture"**(% style="font-family:Calibri; font-size:11pt" %),
1239 +
1240 +(% style="margin:0in" %)
1241 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"state"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Completed"**(% style="font-family:Calibri; font-size:11pt" %),
1242 +
1243 +(% style="margin:0in" %)
1244 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"number"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**1234567890**(% style="font-family:Calibri; font-size:11pt" %),
1245 +
1246 +(% style="margin:0in" %)
1247 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"amount"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**1000**(% style="font-family:Calibri; font-size:11pt" %),
1248 +
1249 +(% style="margin:0in" %)
1250 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"vatAmount"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**250**(% style="font-family:Calibri; font-size:11pt" %),
1251 +
1252 +(% style="margin:0in" %)
1253 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"description"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Test transaction"**(% style="font-family:Calibri; font-size:11pt" %),
1254 +
1255 +(% style="margin:0in" %)
1256 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"payeeReference"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"AH123456"**(% style="font-family:Calibri; font-size:11pt" %),
1257 +
1258 +(% style="margin:0in" %)
1259 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"failedReason"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**""**(% style="font-family:Calibri; font-size:11pt" %),
1260 +
1261 +(% style="margin:0in" %)
1262 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"isOperational"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**false**(% style="font-family:Calibri; font-size:11pt" %),
1263 +
1264 +(% style="margin:0in" %)
1265 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"operations"**(% style="font-family:Calibri; font-size:11pt" %): []
1266 +
1267 +(% style="margin:0in" %)
1268 +(% style="font-family:Calibri; font-size:11pt" %) }
1269 +
1270 +(% style="margin:0in" %)
1271 +(% style="font-family:Calibri; font-size:11pt" %) }]
1272 +
1273 +(% style="margin:0in" %)
1274 +(% style="font-family:Calibri; font-size:11pt" %) }
1275 +
1276 +(% style="margin:0in" %)
1277 +(% style="font-family:Calibri; font-size:11pt" %)}
1278 +)))
1279 +
1280 +**Properties**
1281 +
1282 +(% class="table-bordered table-striped" %)
1283 +|=Property|=Data type|=Description
1284 +|##payment##|##string##|The relative URI of the payment this list of capture transactions belong to.
1285 +|##captures.id##|##string##|The relative URI of the current ##captures## resource.
1286 +|##captures.captureList##|##array##|The array of capture transaction objects.
1287 +|##captures.captureList[]##|##object##|The capture transaction object described in the ##capture## resource below.
1288 +
1289 +==== Create capture transaction ====
1290 +
1291 +To create a {{code}}capture{{/code}} transaction to withdraw money from the payer's card, you need to perform the {{code}}create-capture{{/code}} operation.
1292 +
1293 +{{code language="http" title="**Request**"}}
1294 +
1295 +POST /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures HTTP/1.1
1296 +Host: api.payex.com
1297 +Authorization: Bearer <MerchantToken>
1298 +Content-Type: application/json
1299 +
1300 +{
1301 + "transaction": {
1302 + "amount": 1500,
1303 + "vatAmount": 250,
1304 + "description": "Test Capture",
1305 + "payeeReference": "ABC123"
1306 + }
1307 +}
1308 +{{/code}}
1309 +
1310 +**Properties**
1311 +
1312 +(% class="table-bordered table-striped" %)
1313 +|=Property|=Data type|=Required|=Description
1314 +|##transaction.amount##|##integer##|Y|Amount Entered in the lowest momentary units of the selected currency. E.g. 10000 = 100.00 NOK, 5000 = 50.00 SEK.
1315 +|##transaction.vatAmount##|##integer##|Y|Amount Entered in the lowest momentary units of the selected currency. E.g. 10000 = 100.00 NOK, 5000 = 50.00 SEK.
1316 +|##transaction.description##|##string##|Y|A textual description of the capture transaction.
1317 +|##transaction.payeeReference##|##string(30*)##|Y|A unique reference for the capture transaction. See [[##payeeReference##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HPayeeReference"]] for details.
1318 +
1319 +**Response**
1320 +The {{code}}capture{{/code}} resource contains information about the capture transaction made against a card payment.
1321 +
1322 +(% class="box" %)
1323 +(((
1324 +(% style="margin:0in" %)
1325 +(% style="font-family:Calibri; font-size:11pt; font-weight:bold" %)**Response**
1326 +
1327 +(% style="margin:0in" %)
1328 +(% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**HTTP**(% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**/1.1 200 **(% style="color:#d2413a; font-family:Calibri; font-size:11pt; font-weight:bold" %)**OK**
1329 +
1330 +(% style="margin:0in" %)
1331 +(% style="color:#7d9029; font-family:Calibri; font-size:11pt" %)Content-Type(% style="color:#666666; font-family:Calibri; font-size:11pt" %):(% style="font-family:Calibri; font-size:11pt" %) application/json
1332 +
1333 +(% style="margin:0in" %)
1334 +(% style="font-family:Calibri; font-size:11pt" %)
1335 +
1336 +(% style="margin:0in" %)
1337 +(% style="font-family:Calibri; font-size:11pt" %){
1338 +
1339 +(% style="margin:0in" %)
1340 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"payment"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c"**(% style="font-family:Calibri; font-size:11pt" %),
1341 +
1342 +(% style="margin:0in" %)
1343 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"capture"**(% style="font-family:Calibri; font-size:11pt" %): {
1344 +
1345 +(% style="margin:0in" %)
1346 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"id"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/captures/12345678-1234-1234-1234-123456789012"**(% style="font-family:Calibri; font-size:11pt" %),
1347 +
1348 +(% style="margin:0in" %)
1349 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"transaction"**(% style="font-family:Calibri; font-size:11pt" %): {
1350 +
1351 +(% style="margin:0in" %)
1352 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"id"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012"**(% style="font-family:Calibri; font-size:11pt" %),
1353 +
1354 +(% style="margin:0in" %)
1355 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"created"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"2016-09-14T01:01:01.01Z"**(% style="font-family:Calibri; font-size:11pt" %),
1356 +
1357 +(% style="margin:0in" %)
1358 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"updated"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"2016-09-14T01:01:01.03Z"**(% style="font-family:Calibri; font-size:11pt" %),
1359 +
1360 +(% style="margin:0in" %)
1361 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"type"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Capture"**(% style="font-family:Calibri; font-size:11pt" %),
1362 +
1363 +(% style="margin:0in" %)
1364 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"state"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Completed"**(% style="font-family:Calibri; font-size:11pt" %),
1365 +
1366 +(% style="margin:0in" %)
1367 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"number"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**1234567890**(% style="font-family:Calibri; font-size:11pt" %),
1368 +
1369 +(% style="margin:0in" %)
1370 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"amount"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**1500**(% style="font-family:Calibri; font-size:11pt" %),
1371 +
1372 +(% style="margin:0in" %)
1373 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"vatAmount"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#666666; font-family:Calibri; font-size:11pt; font-weight:bold" %)**250**(% style="font-family:Calibri; font-size:11pt" %),
1374 +
1375 +(% style="margin:0in" %)
1376 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"description"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"Test Capture"**(% style="font-family:Calibri; font-size:11pt" %),
1377 +
1378 +(% style="margin:0in" %)
1379 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"payeeReference"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:#ba2121; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"ABC123"**(% style="font-family:Calibri; font-size:11pt" %),
1380 +
1381 +(% style="margin:0in" %)
1382 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"isOperational"**(% style="font-family:Calibri; font-size:11pt" %): (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**false**(% style="font-family:Calibri; font-size:11pt" %),
1383 +
1384 +(% style="margin:0in" %)
1385 +(% style="font-family:Calibri; font-size:11pt" %) (% style="color:green; font-family:Calibri; font-size:11pt; font-weight:bold" %)**"operations"**(% style="font-family:Calibri; font-size:11pt" %): []
1386 +
1387 +(% style="margin:0in" %)
1388 +(% style="font-family:Calibri; font-size:11pt" %) }
1389 +
1390 +(% style="margin:0in" %)
1391 +(% style="font-family:Calibri; font-size:11pt" %) }
1392 +
1393 +(% style="margin:0in" %)
1394 +(% style="font-family:Calibri; font-size:11pt" %)}
1395 +)))
1396 +
1397 +**Properties**
1398 +
1399 +(% class="table-bordered table-striped" %)
1400 +|=Property|=Data type|=Description
1401 +|##payment##|##string##|The relative URI of the payment this capture transaction belongs to.
1402 +|##capture.id##|##string##|The relative URI of the created capture transaction.
1403 +|##capture.transaction##|##object##|The object representation of the generic [[##transaction## resource>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
1404 +
1405 +=== Finalize ===
1406 +
1407 +Finalizing a preauthorized payment is done as a ##{{code}}PATCH{{/code}}## after a successful ##Authorization## transaction has been created. The common use-case for the finalize operation is to authorize the payment (that has the preauthorization intent) and complete all payment related activities as soon as possible - in order to complete (finalize) everything server-to-server afterwards. The only allowed activity is ##Finalize##. To use the operation, you should perform a ##{{code}}GET{{/code}}## on the payment after the user returns from the ##redirect-authorization## operation and find the operation ##update-authorization-finalize##.
1408 +
1409 +{{code language="http" title="**Request**"}}
1410 +
1411 +PATCH /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/<transactionId> HTTP/1.1
1412 +Host: api.payex.com
1413 +Authorization: Bearer <MerchantToken>
1414 +Content-Type: application/json
1415 +
1416 +{
1417 + "transaction": {
1418 + "activity": "Finalize"
1419 + }
1420 +}
1421 +{{/code}}
1422 +
1423 +|=Property|=Data type|=Required|=Description
1424 +|##transaction.activity##|##string##|Y|##Finalize##
1425 +
1426 +{{code language="http" title="**Response**"}}
1427 +
1428 +HTTP/1.1 200 OK
1429 +Content-Type: application/json
1430 +
1431 +{
1432 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1433 + "authorization": {
1434 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/authorizations/12345678-1234-1234-1234-123456789012",
1435 + "paymentToken": "12345678-1234-1234-1234-123456789012",
1436 + "maskedPan": "123456xxxxxx1234",
1437 + "expireDate": "mm/yyyy",
1438 + "panToken": "12345678-1234-1234-1234-123456789012",
1439 + "cardBrand": "Visa|MC",
1440 + "cardType": "Credit Card|Debit Card",
1441 + "issuingBank": "UTL MAESTRO",
1442 + "countryCode": "999",
1443 + "acquirerTransactionType": "3DSECURE|SSL",
1444 + "acquirerStan": "39736",
1445 + "acquirerTerminalId": "39",
1446 + "acquirerTransactionTime": "2017-08-29T13:42:18Z",
1447 + "authenticationStatus": "Y|A|U|N",
1448 + "transaction": {
1449 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1450 + "created": "2016-09-14T01:01:01.01Z",
1451 + "updated": "2016-09-14T01:01:01.03Z",
1452 + "type": "Authorization",
1453 + "state": "Initialized",
1454 + "number": 1234567890,
1455 + "amount": 1000,
1456 + "vatAmount": 250,
1457 + "description": "Test transaction",
1458 + "payeeReference": "AH123456",
1459 + "failedReason": "",
1460 + "isOperational": true,
1461 + "operations": [
1462 + {
1463 + "href": "https://api.payex.com/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1464 + "rel": "edit-authorization",
1465 + "method": "PATCH"
1466 + }
1467 + ]
1468 + }
1469 + }
1470 +}
1471 +{{/code}}
1472 +
1473 +**Properties**
1474 +
1475 +(% class="table-bordered table-striped" %)
1476 +|=Property|=Data type|=Description
1477 +|##payment##|##string##|The relative URI of the payment this finalize transaction resource belongs to.
1478 +|##authorization##|##object##|The object representation of the [[##authorization## transaction resource>>doc:||anchor="HAuthorizations"]].
1479 +
1480 +=== Cancellations ===
1481 +
1482 +The {{code}}cancellations{{/code}} resource lists the cancellation transactions on a specific payment.
1483 +
1484 +{{code language="http" title="**Request**"}}
1485 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations HTTP/1.1
1486 +Host: api.payex.com
1487 +Authorization: Bearer <MerchantToken>
1488 +Content-Type: application/json
1489 +{{/code}}
1490 +
1491 +{{code language="http" title="**Response**"}}
1492 +
1493 +HTTP/1.1 200 OK
1494 +Content-Type: application/json
1495 +
1496 +{
1497 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1498 + "cancellations": {
1499 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations",
1500 + "cancellationList": [{
1501 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations/12345678-1234-1234-1234-123456789012",
1502 + "transaction": {
1503 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1504 + "created": "2016-09-14T01:01:01.01Z",
1505 + "updated": "2016-09-14T01:01:01.03Z",
1506 + "type": "Cancellation",
1507 + "state": "Completed",
1508 + "number": 1234567890,
1509 + "amount": 1000,
1510 + "vatAmount": 250,
1511 + "description": "Test transaction",
1512 + "payeeReference": "AH123456",
1513 + "failedReason": "",
1514 + "isOperational": false,
1515 + "operations": []
1516 + }
1517 + }]
1518 + }
1519 +}
1520 +{{/code}}
1521 +
1522 +**Properties**
1523 +
1524 +(% class="table-bordered table-striped" %)
1525 +|=Property|=Data type|=Description
1526 +|##payment##|##string##|The relative URI of the payment this list of cancellation transactions belong to.
1527 +|##cancellations.id##|##string##|The relative URI of the current ##cancellations## resource.
1528 +|##cancellations.cancellationList##|##array##|The array of the cancellation transaction objects.
1529 +|##cancellations.cancellationList[]##|##object##|The object representation of the cancellation transaction resource described below.
1530 +
1531 +==== Create cancellation transaction ====
1532 +
1533 +Perform the {{code}}create-cancel{{/code}} operation to cancel a previously created - and not yet captured - payment.
1534 +
1535 +{{code language="http" title="**Request**"}}
1536 +
1537 +POST /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations HTTP/1.1
1538 +Host: api.payex.com
1539 +Authorization: Bearer <MerchantToken>
1540 +Content-Type: application/json
1541 +
1542 +{
1543 + "transaction": {
1544 + "description": "Test Cancellation",
1545 + "payeeReference": "ABC123"
1546 + }
1547 +}
1548 +{{/code}}
1549 +
1550 +**Properties**
1551 +
1552 +(% class="table-bordered table-striped" %)
1553 +|=Property|=Data type|=Required|=Description
1554 +|##transaction.description##|##string##|Y|A textual description of the reason for the cancellation.
1555 +|##transaction.payeeReference##|##string(30*)##|Y|A unique reference for the cancellation transaction. See [[##payeeReference##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HPayeeReference"]] for details.
1556 +
1557 +The {{code}}cancel{{/code}} resource contains information about a cancellation transaction made against a payment.
1558 +
1559 +{{code language="http" title="**Response**"}}
1560 +
1561 +HTTP/1.1 200 OK
1562 +Content-Type: application/json
1563 +
1564 +{
1565 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1566 + "cancellation": {
1567 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/cancellations/12345678-1234-1234-1234-123456789012",
1568 + "transaction": {
1569 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1570 + "created": "2016-09-14T01:01:01.01Z",
1571 + "updated": "2016-09-14T01:01:01.03Z",
1572 + "type": "Cancellation",
1573 + "state": "Initialized",
1574 + "number": 1234567890,
1575 + "amount": 1000,
1576 + "vatAmount": 250,
1577 + "description": "Test Cancellation",
1578 + "payeeReference": "ABC123",
1579 + "failedReason": "",
1580 + "isOperational": false,
1581 + "operations": []
1582 + }
1583 + }
1584 +}
1585 +{{/code}}
1586 +
1587 +**Properties**
1588 +
1589 +(% class="table-bordered table-striped" %)
1590 +|=Property|=Data type|=Description
1591 +|##payment##|##string##|The relative URI of the payment this cancellation transaction belongs to.
1592 +|##cancellation.id##|##string##|The relative URI of the current cancellation transaction resource.
1593 +|##cancellation.transaction##|##object##|The object representation of the generic [[transaction resource>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
1594 +
1595 +=== Reversals ===
1596 +
1597 +The {{code}}reversals{{/code}} resource lists the reversal transactions (one or more) on a specific payment.
1598 +
1599 +{{code language="http" title="**Request**"}}
1600 +GET /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversals HTTP/1.1
1601 +Host: api.payex.com
1602 +Authorization: Bearer <MerchantToken>
1603 +Content-Type: application/json
1604 +{{/code}}
1605 +
1606 +{{code language="http" title="**Response**"}}
1607 +
1608 +HTTP/1.1 200 OK
1609 +Content-Type: application/json
1610 +
1611 +{
1612 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1613 + "reversals": {
1614 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversal",
1615 + "reversalList": [{
1616 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversal/12345678-1234-1234-1234-123456789012",
1617 + "transaction": {
1618 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1619 + "created": "2016-09-14T01:01:01.01Z",
1620 + "updated": "2016-09-14T01:01:01.03Z",
1621 + "type": "Reversal",
1622 + "state": "Completed",
1623 + "number": 1234567890,
1624 + "amount": 1000,
1625 + "vatAmount": 250,
1626 + "description": "Test transaction",
1627 + "payeeReference": "AH123456",
1628 + "failedReason": "",
1629 + "isOperational": false,
1630 + "operations": []
1631 + }
1632 + }]
1633 + }
1634 +}
1635 +{{/code}}
1636 +
1637 +**Properties**
1638 +
1639 +(% class="table-bordered table-striped" %)
1640 +|=Property|=Type|=Description
1641 +|##payment##|##string##|The relative URI of the payment that the reversal transactions belong to.
1642 +|##id##|##string##|The relative URI of the created reversal transaction.
1643 +|##reversalList##|##array##|The array of reversal transaction objects.
1644 +|##reversalList[]##|##object##|The reversal transaction object representation of the reversal transaction resource described below.
1645 +
1646 +==== Create reversal transaction ====
1647 +
1648 +The {{code}}create-reversal{{/code}} operation will reverse a previously captured payment.
1649 +
1650 +{{code language="http" title="**Request**"}}
1651 +
1652 +POST /psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversals HTTP/1.1
1653 +Host: api.payex.com
1654 +Authorization: Bearer <MerchantToken>
1655 +Content-Type: application/json
1656 +
1657 +{
1658 + "transaction": {
1659 + "amount": 1500,
1660 + "vatAmount": 0,
1661 + "description": "Test Reversal",
1662 + "payeeReference": "ABC123"
1663 + }
1664 +}
1665 +{{/code}}
1666 +
1667 +**Properties**
1668 +
1669 +(% class="table-bordered table-striped" %)
1670 +|=Property|=Data type|=Required|=Description
1671 +|##transaction.amount##|##integer##|Y|Amount Entered in the lowest momentary units of the selected currency. E.g. 10000 = 100.00 NOK, 5000 = 50.00 SEK.
1672 +|##transaction.vatAmount##|##integer##|Y|Amount Entered in the lowest momentary units of the selected currency. E.g. 10000 = 100.00 NOK, 5000 = 50.00 SEK.
1673 +|##transaction.description##|##string##|Y|A textual description of the capture
1674 +|##transaction.payeeReference##|##string(30*)##|Y|A unique reference for the reversal transaction. See [[##payeeReference##>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HPayeeReference"]] for details.
1675 +
1676 +The {{code}}reversal{{/code}} resource contains information about the newly created reversal transaction.
1677 +
1678 +
1679 +{{code language="http" title="**Response**"}}
1680 +
1681 +HTTP/1.1 200 OK
1682 +Content-Type: application/json
1683 +
1684 +{
1685 + "payment": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c",
1686 + "reversal": {
1687 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/reversal/12345678-1234-1234-1234-123456789012",
1688 + "transaction": {
1689 + "id": "/psp/creditcard/payments/5adc265f-f87f-4313-577e-08d3dca1a26c/transactions/12345678-1234-1234-1234-123456789012",
1690 + "created": "2016-09-14T01:01:01.01Z",
1691 + "updated": "2016-09-14T01:01:01.03Z",
1692 + "type": "Reversal",
1693 + "state": "Completed",
1694 + "number": 1234567890,
1695 + "amount": 1000,
1696 + "vatAmount": 250,
1697 + "description": "Test transaction",
1698 + "payeeReference": "AH123456",
1699 + "failedReason": "",
1700 + "isOperational": false,
1701 + "operations": []
1702 + }
1703 + }
1704 +}
1705 +{{/code}}
1706 +
1707 +**Properties**
1708 +
1709 +(% class="table-bordered table-striped" %)
1710 +|=Property|=Data type|=Description
1711 +|##payment##|##string##|The relative URI of the payment this reversal transaction belongs to.
1712 +|##reversal.id##|##string##|The relative URI of the created reversal transaction.
1713 +|##reversal.transaction##|##object##|The object representation of the generic [[##transaction## resource>>doc:Main.ecommerce.technical-reference.core-payment-resources.WebHome||anchor="HTransactions"]].
1714 +
1715 +== Remove payment token ==
1716 +
1717 +If you, for any reason, need to delete a ##paymentToken ##you use the {{code}}Delete payment token{{/code}} request.
1718 +
1719 +(% class="box warningmessage" %)
1720 +(((
1721 +Please note that this call does not erase the card number stored at PayEx. A card number is automatically deleted six months after a successful {{code}}Delete payment token{{/code}} request. If you want to remove card information beforehand, you need to contact [[support.ecom@payex.com>>mailto:support.ecom@payex.com]]; and supply them with the relevant transaction reference or payment token.
1722 +)))
1723 +
1724 +
1725 +{{code language="http" title="**Request**"}}
1726 +PATCH /psp/creditcard/payments/instrumentData/<paymentToken> HTTP/1.1
1727 +Host: api.payex.com
1728 +Authorization: Bearer <MerchantToken>
1729 +Content-Type: application/json
1730 +
1731 +{
1732 + "state": "Deleted",
1733 + "tokenType" : "PaymentToken|RecurrenceToken",
1734 + "comment": "Comment on why the deletion is happening"
1735 +}
1736 +{{/code}}
1737 +
1738 +{{code language="http" title="**Response**"}}
1739 +HTTP/1.1 200 OK
1740 +Content-Type: application/json
1741 +
1742 +{
1743 + "instrumentData": {
1744 + "id": "/psp/creditcard/payments/instrumentdata/12345678-1234-1234-1234-123456789000",
1745 + "paymentToken": "12345678-1234-1234-1234-123456789000",
1746 + "payeeId": "61c65499-de5c-454e-bf4c-043f22538d49",
1747 + "isDeleted": true|false,
1748 + "isPayeeToken": false,
1749 + "cardBrand": "Visa|MasterCard|...",
1750 + "maskedPan": "123456xxxxxx1111",
1751 + "expiryDate": "MM/YYYY"
1752 + }
1753 +}
1754 +{{/code}}
1755 +
1756 +== Callback ==
1757 +
1758 +When a change or update from the back-end system are made on a payment or transaction, PayEx will perform a callback to inform the payee (merchant) about this update. Callback functionality is explaned in more detail [[here>>doc:Main.ecommerce.technical-reference.WebHome||anchor="HCallback"]].
1759 +
1760 +{{plantuml}}
1761 +@startuml
1762 +skinparam sequence{
1763 + ArrowColor #2DA944
1764 +
1765 + ActorFontColor #333333
1766 + ActorFontStyle bold
1767 + ActorFontSize 15
1768 + ActorBackgroundColor #fefefe
1769 + ActorBorderColor #2DA944
1770 +
1771 + LifeLineBorderColor #999999
1772 + LifeLineBackgroundColor #dddddd
1773 +
1774 + ParticipantBorderColor #2DA944
1775 + ParticipantBackgroundColor #ffffff
1776 + ParticipantFontColor #333333
1777 + ParticipantFontStyle bold
1778 +}
1779 +skinparam Roundcorner 10
1780 +skinparam Shadowing false
1781 +
1782 +skinparam ActivityBorderColor #123123
1783 +
1784 +skinparam NoteBackgroundColor white
1785 +skinparam NoteBorderColor #999999
1786 +skinparam NoteFontColor #333333
1787 +
1788 +Participant Merchant
1789 +Participant PAYEX
1790 +
1791 +'------------------------------------------------------------------------------------------------------------------------------------------------------------
1792 +Activate Merchant
1793 +Activate PAYEX
1794 +PAYEX->Merchant: POST <callbackUrl>
1795 +note left: Callback by PayEx
1796 +Merchant-->PAYEX: HTTP response
1797 +Deactivate PAYEX
1798 +Deactivate Merchant
1799 +'------------------------------------------------------------------------------------------------------------------------------------------------------------
1800 +Merchant->PAYEX: GET [[https://wiki.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/core-payment-resources/card-payments/ credit card payment]]
1801 +note left: First API request
1802 +Activate PAYEX
1803 +PAYEX-->Merchant: payment resource
1804 +Deactivate PAYEX
1805 +Deactivate Merchant
1806 +'------------------------------------------------------------'
1807 +
1808 +
1809 +@enduml
1810 +{{/plantuml}}
1811 +
1812 +== **Problem messages** ==
1813 +
1814 +When performing unsuccessful operations, the eCommerce API will respond with a problem message. We generally use the problem message ##type## and ##status## code to identify the nature of the problem. The problem ##name## and ##description## will often help narrow down the specifics of the problem.
1815 +
1816 +For general information about problem messages and error handling,[[ visit error handling and problem details. >>doc:Main.ecommerce.technical-reference.WebHome||anchor="HProblemmessages"]]
1817 +
1818 +=== Contractual error types ===
1819 +
1820 +All contract types will have the following URI in front of type: ##{{code}}https://api.payex.com/psp/<errordetail>/creditcard{{/code}}##
1821 +
1822 +(% border="1" class="table-striped" %)
1823 +|=Type|=Status|=Notes
1824 +|##cardbranddisabled##|403|
1825 +|##accountholdertyperejected##|403|
1826 +|##cardtyperejected##|403|
1827 +|##3dsecurerequired##|403|
1828 +|##authenticationstatusrejected##|403|
1829 +|##frauddetected##|403|
1830 +|##3dsecuredeclined##|403|
1831 +
1832 +=== Error types from 3Dsecure/ Acquirer ===
1833 +
1834 +All acquirer error types will have the following URI in front of type: ##{{code}}https://api.payex.com/psp/errordetail/creditcard/<errorType>{{/code}}##
1835 +
1836 +(% border="1" class="table-striped" %)
1837 +|=Type|=Status|=Notes
1838 +|##3dsecureerror##|400|3D Secure not working, try again some time later
1839 +|##cardblacklisted##|400|Card blacklisted, Consumer need to contact their Card-issuing bank
1840 +|##paymenttokenerror##|403|
1841 +|##carddeclined##|403|
1842 +|##acquirererror##|403|
1843 +|##acquirercardblacklisted##|403|Card blacklisted, Consumer need to contact their Card-issuing bank
1844 +|##acquirercardexpired##|403|Wrong expire date or Card has expired and consumer need to contact their Card-issuing bank
1845 +|##acquirercardstolen##|403|Card blacklisted, Consumer need to contact their Card-issuing bank
1846 +|##acquirerinsufficientfunds##|403|Card does not have sufficient funds, consumer need to contact their Card-issuing bank.
1847 +|##acquirerinvalidamount##|403|Amount not valid by aquirer, contact support.ecom@payex.com
1848 +|##acquirerpossiblefraud##|403|Transaction declined due to possible fraud, consumer need to contact their Card-issuing bank.
1849 +|##3dsecureusercanceled##|403|Transaction was Cancelled during 3DSecure verification
1850 +|##3dsecuredeclined##|403|Transaction was declined during 3DSecure verification
1851 +|##frauddetected##|403|Fraud detected. Consumer need to contact their Card-issuing bank.
1852 +|##badrequest##|500|Bad request, try again after some time
1853 +|##internalservererror##|500|Server error, try again after some time
1854 +|##3dsecureacquirergatewayerror##|502|Problems reaching 3DSecure verification, try again after some time.
1855 +|##badgateway##|502|Problems reaching the gateway, try again after some time
1856 +|##acquirergatewayerror##|502|Problems reaching acquirers gateway, try again after some time
1857 +|##acquirergatewaytimeout##|504|Problems reaching acquirers gateway, try again after some time