Files
adyen-curl/PostDonations.ps1
Julien Lengrand-Lambert 610eb4d5a9 For fun
2024-02-22 16:13:52 +01:00

279 lines
8.4 KiB
PowerShell

<#
Request: POST /donations
Summary: Start a transaction for donations
Description: Takes in the donation token generated by the `/payments` request and uses it to make the donation for the donation account specified in the request.
For more information, see [Donations](https://docs.adyen.com/online-payments/donations).
#>
curl -X POST https://checkout-test.adyen.com/v71/donations `
-H 'Accept: application/json' `
-H 'Content-Type: application/json' `
-d '{
"accountInfo": {
"accountAgeIndicator": "notApplicable",
"accountChangeDate": "2024-02-22T15:12:38.2293120+00:00",
"accountChangeIndicator": "thisTransaction",
"accountCreationDate": "2024-02-22T15:12:38.2296510+00:00",
"accountType": "notApplicable",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "2024-02-22T15:12:38.2316190+00:00",
"deliveryAddressUsageIndicator": "thisTransaction",
"homePhone": "homePhone",
"mobilePhone": "mobilePhone",
"passwordChangeDate": "2024-02-22T15:12:38.2316270+00:00",
"passwordChangeIndicator": "notApplicable",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "2024-02-22T15:12:38.2316340+00:00",
"paymentAccountIndicator": "notApplicable",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": "workPhone"
},
"additionalData": {},
"amount": {
"currency": "currency",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "name",
"version": "version"
},
"adyenPaymentSource": {
"name": "name",
"version": "version"
},
"externalPlatform": {
"integrator": "integrator",
"name": "name",
"version": "version"
},
"merchantApplication": {
"name": "name",
"version": "version"
},
"merchantDevice": {
"os": "os",
"osVersion": "osVersion",
"reference": "reference"
},
"shopperInteractionDevice": {
"locale": "locale",
"os": "os",
"osVersion": "osVersion"
}
},
"authenticationData": {
"attemptAuthentication": "always",
"authenticationOnly": "false",
"threeDSRequestData": {
"challengeWindowSize": "01",
"dataOnly": "false",
"nativeThreeDS": "preferred",
"threeDSVersion": "2.1.0"
}
},
"billingAddress": {
"city": "city",
"country": "country",
"houseNumberOrName": "houseNumberOrName",
"postalCode": "postalCode",
"stateOrProvince": "stateOrProvince",
"street": "street"
},
"browserInfo": {
"acceptHeader": "acceptHeader",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": "true",
"language": "language",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": "userAgent"
},
"channel": "iOS",
"checkoutAttemptId": "checkoutAttemptId",
"conversionId": "conversionId",
"countryCode": "countryCode",
"dateOfBirth": "2024-02-22T15:12:38.2319550+00:00",
"deliverAt": "2024-02-22T15:12:38.2319560+00:00",
"deliveryAddress": {
"city": "city",
"country": "country",
"firstName": "firstName",
"houseNumberOrName": "houseNumberOrName",
"lastName": "lastName",
"postalCode": "postalCode",
"stateOrProvince": "stateOrProvince",
"street": "street"
},
"deviceFingerprint": "deviceFingerprint",
"donationAccount": "donationAccount",
"donationOriginalPspReference": "donationOriginalPspReference",
"donationToken": "donationToken",
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "brand",
"color": "color",
"description": "description",
"id": "id",
"imageUrl": "imageUrl",
"itemCategory": "itemCategory",
"manufacturer": "manufacturer",
"productUrl": "productUrl",
"quantity": 0,
"receiverEmail": "receiverEmail",
"size": "size",
"sku": "sku",
"taxAmount": 0,
"taxPercentage": 0,
"upc": "upc"
}
],
"merchantAccount": "merchantAccount",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "shipToBillingAddress",
"deliveryEmail": "deliveryEmail",
"deliveryEmailAddress": "deliveryEmailAddress",
"deliveryTimeframe": "electronicDelivery",
"giftCardAmount": {
"currency": "currency",
"value": 0
},
"giftCardCount": 0,
"giftCardCurr": "giftCardCurr",
"preOrderDate": "2024-02-22T15:12:38.2320250+00:00",
"preOrderPurchase": false,
"preOrderPurchaseInd": "preOrderPurchaseInd",
"reorderItems": false,
"reorderItemsInd": "reorderItemsInd",
"shipIndicator": "shipIndicator"
},
"metadata": {},
"mpiData": {
"authenticationResponse": "Y",
"cavv": "cavv",
"cavvAlgorithm": "cavvAlgorithm",
"challengeCancel": "01",
"directoryResponse": "A",
"dsTransID": "dsTransID",
"eci": "eci",
"riskScore": "riskScore",
"threeDSVersion": "threeDSVersion",
"tokenAuthenticationVerificationValue": "tokenAuthenticationVerificationValue",
"transStatusReason": "transStatusReason",
"xid": "xid"
},
"origin": "origin",
"paymentMethod": null,
"recurringProcessingModel": "CardOnFile",
"redirectFromIssuerMethod": "redirectFromIssuerMethod",
"redirectToIssuerMethod": "redirectToIssuerMethod",
"reference": "reference",
"returnUrl": "returnUrl",
"sessionValidity": "sessionValidity",
"shopperEmail": "shopperEmail",
"shopperIP": "shopperIP",
"shopperInteraction": "Ecommerce",
"shopperLocale": "shopperLocale",
"shopperName": {
"firstName": "firstName",
"lastName": "lastName"
},
"shopperReference": "shopperReference",
"socialSecurityNumber": "socialSecurityNumber",
"telephoneNumber": "telephoneNumber",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "01",
"chAccChange": "chAccChange",
"chAccChangeInd": "01",
"chAccPwChange": "chAccPwChange",
"chAccPwChangeInd": "01",
"chAccString": "chAccString",
"nbPurchaseAccount": "nbPurchaseAccount",
"paymentAccAge": "paymentAccAge",
"paymentAccInd": "01",
"provisionAttemptsDay": "provisionAttemptsDay",
"shipAddressUsage": "shipAddressUsage",
"shipAddressUsageInd": "01",
"shipNameIndicator": "01",
"suspiciousAccActivity": "01",
"txnActivityDay": "txnActivityDay",
"txnActivityYear": "txnActivityYear"
},
"acctType": "01",
"acquirerBIN": "acquirerBIN",
"acquirerMerchantID": "acquirerMerchantID",
"addrMatch": "Y",
"authenticationOnly": "false",
"challengeIndicator": "noPreference",
"deviceRenderOptions": {
"sdkInterface": "both",
"sdkUiType": [
"multiSelect"
]
},
"homePhone": {
"cc": "cc",
"subscriber": "subscriber"
},
"mcc": "mcc",
"merchantName": "merchantName",
"messageVersion": "messageVersion",
"mobilePhone": {
"cc": "cc",
"subscriber": "subscriber"
},
"notificationURL": "notificationURL",
"payTokenInd": false,
"paymentAuthenticationUseCase": "paymentAuthenticationUseCase",
"platform": "iOS",
"purchaseInstalData": "purchaseInstalData",
"recurringExpiry": "recurringExpiry",
"recurringFrequency": "recurringFrequency",
"sdkAppID": "sdkAppID",
"sdkEphemPubKey": {
"crv": "crv",
"kty": "kty",
"x": "x",
"y": "y"
},
"sdkMaxTimeout": "60",
"sdkReferenceNumber": "sdkReferenceNumber",
"sdkTransID": "sdkTransID",
"threeDSCompInd": "threeDSCompInd",
"threeDSRequestorAuthenticationInd": "threeDSRequestorAuthenticationInd",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "threeDSReqAuthData",
"threeDSReqAuthMethod": "01",
"threeDSReqAuthTimestamp": "threeDSReqAuthTimestamp"
},
"threeDSRequestorChallengeInd": "01",
"threeDSRequestorID": "threeDSRequestorID",
"threeDSRequestorName": "threeDSRequestorName",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "threeDSReqPriorAuthData",
"threeDSReqPriorAuthMethod": "01",
"threeDSReqPriorAuthTimestamp": "threeDSReqPriorAuthTimestamp",
"threeDSReqPriorRef": "threeDSReqPriorRef"
},
"threeDSRequestorURL": "threeDSRequestorURL",
"transType": "01",
"transactionType": "goodsOrServicePurchase",
"whiteListStatus": "whiteListStatus",
"workPhone": {
"cc": "cc",
"subscriber": "subscriber"
}
},
"threeDSAuthenticationOnly": "false"
}'