diff --git a/src/content/api/_endpoints/payment-requests-pay.js b/src/content/api/_endpoints/payment-requests-pay.js index 738371c8e..a48409fa2 100644 --- a/src/content/api/_endpoints/payment-requests-pay.js +++ b/src/content/api/_endpoints/payment-requests-pay.js @@ -7,6 +7,7 @@ export default { 'Content-Type': 'application/json', }, payload: { + idempotencyKey: 'b62-11ec-9072-3e22fb52e878', assetType: 'centrapay.nzd.main', assetId: 'WRhAxxWpTKb5U7pXyxQjjY', amount: '200', @@ -20,6 +21,7 @@ export default { currency: 'NZD', amount: '1000' }, + idempotencyKey: '8b62-11ec-9072-3e22fb52e878', assetType: 'centrapay.nzd.main', paymentRequestId: 'MhocUmpxxmgdHjr7DgKoKw', shortCode: 'CP-C7F-ZS5-015', diff --git a/src/content/api/payment-requests.mdoc b/src/content/api/payment-requests.mdoc index 3f4ec4059..b7c7b9e12 100644 --- a/src/content/api/payment-requests.mdoc +++ b/src/content/api/payment-requests.mdoc @@ -615,12 +615,15 @@ Payment Activities are created when a Payment Request has been `created`, `paid` %} ## Pay a Payment Request - To pay a Payment Request you must supply the name of the [Asset Type](/api/asset-types) and one of `assetId`, `transactionId` or `authorization`. + To pay a Payment Request you must supply the name of the [Asset Type](/api/asset-types) , `idempotencyKey` and one of `assetId`, `transactionId` or `authorization`. - Use `assetId` if the [Asset Type](/api/asset-types) is managed by Centrapay. - Use `transactionId` to verify an external transaction such as a Bitcoin payment. - Use `authorization` to authorize an external transaction. {% properties %} + {% property name="idempotencyKey" type="string" required=true %} + A unique identifier that prevents duplicate processing of the same request. + {% /property %} {% property name="assetType" type="string" required=true %} An [Asset Type](/api/asset-types) reference. {% /property %}