# How to call Donation Record API source: https://developer.mastercard.com/donations/tutorial/donation-api-details/recordapi/index.md ### Store external donations {#store-external-donations} The `/donations/records` endpoint allows users to store donations from external partners, merchants, and other solutions that do not integrate with Mastercard Donate APIs. ## POST /donations/records {#post-donationsrecords} ## Prerequisites {#prerequisites} Before executing the test cases, acquaint yourself with the endpoint use case and parameters: * [Store External Donations](https://developer.mastercard.com/donations/documentation/use-cases/record-api/index.md) * [Parameters to Store External Donations](https://developer.mastercard.com/donations/documentation/parameters/records/index.md) ## Test Case {#test-case} 1. To create a POST request, fill out the partner, merchant, customer, and donation transaction details as shown in the request. ```py POST https://sandbox.api.mastercard.com/donations/records ``` ```JSON { "partner": { "partnerName": "Verestro", "isoCountryCode": "VIR", "locale": "en" }, "customer": { "customerName": "Amazon", "isoCountryCode": "USA", "locale": "en" }, "merchant": { "merchantId": "5077f7d84", "merchantName": "Santander" }, "transactionDate": "2022-06-28 10:50:10", "transactionId": "Td-123567810", "campaignId": "CampId-564", "currency": "rupee", "amount": "12.09", "cardScheme": "Mastercard", "charityId": "ec5b06ed-9c14", "charityName": "Happy Smiles", "donationType": "Micro" } ``` 4. A successful request returns the `HTTP 200 Success` status code. This section discusses some of the failed scenarios and the error messages expected. If you try to save the details of an external partner again, the request terminates with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DUPLICATE_RECORD_FOUND", "Description": "Record already exists.", "Recoverable": false, "Details": null } ] } } ```