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

94 lines
2.7 KiB
PowerShell

<#
Request: POST /payments/{paymentPspReference}/amountUpdates
Summary: Update an authorised amount
Description: Increases or decreases the authorised payment amount and returns a unique reference for this request. You get the outcome of the request asynchronously, in an [**AUTHORISATION_ADJUSTMENT** webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes).
You can only update authorised amounts that have not yet been [captured](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/captures).
The amount you specify in the request is the updated amount, which is larger or smaller than the initial authorised amount.
For more information, refer to [Authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#use-cases).
#>
param(
<# The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment. #>
[Parameter(Mandatory=$True)]
[String] $paymentPspReferen
)
curl -X POST https://checkout-test.adyen.com/v71/payments/$paymentPspReference/amountUpdates `
-H 'Accept: application/json' `
-H 'Content-Type: application/json' `
-d '{
"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"
}
},
"industryUsage": "delayedCharge",
"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",
"reference": "reference",
"splits": [
{
"account": "account",
"amount": {
"currency": "currency",
"value": 0
},
"description": "description",
"reference": "reference",
"type": "AcquiringFees"
}
]
}'