Chilkat Online Tools

C / Salesforce Platform APIs / Update Commitment Payments

Back to Collection Items

#include <C_CkHttp.h>
#include <C_CkJsonObject.h>
#include <C_CkHttpResponse.h>
#include <C_CkStringBuilder.h>

void ChilkatSample(void)
    {
    HCkHttp http;
    BOOL success;
    HCkJsonObject json;
    HCkHttpResponse resp;
    HCkStringBuilder sbResponseBody;
    HCkJsonObject jResp;
    int respStatusCode;
    BOOL success;
    const char *Href;
    const char *Id;
    const char *PaymentinstrumentHref;
    const char *PaymentinstrumentId;
    int successes;
    int failures;
    int notProcessed;
    int i;
    int count_i;

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http = CkHttp_Create();

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "updates": [
    //     {
    //       "giftCommitmentId": "<SFDC_GIFT_COMMITMENT_ID>",
    //       "paymentInstrument": {
    //         "type": "credit card",
    //         "accountHolderName": "test donor 1",
    //         "expiryMonth": "10",
    //         "expiryYear": "2026",
    //         "last4": "4585",
    //         "cardBrand": "visa",
    //         "bankName": "chase",
    //         "digitalWalletProvider": "apple pay",
    //         "bankAccountHolderType": "primary",
    //         "bankAccountType": "checking",
    //         "bankAccountNumber": "123456",
    //         "bankCode": "HBUK",
    //         "gatewayName": "stripe",
    //         "processorName": "classy",
    //         "processorPaymentReference": "string",
    //         "gatewayReference": "string"
    //       }
    //     },
    //     {
    //       "giftCommitmentId": "<SFDC_GIFT_COMMITMENT_ID>",
    //       "paymentInstrument": {
    //         "type": "credit card",
    //         "accountHolderName": "test donor 2",
    //         "expiryMonth": "10",
    //         "expiryYear": "2026",
    //         "last4": "4585",
    //         "cardBrand": "visa",
    //         "bankName": "chase",
    //         "digitalWalletProvider": "apple pay",
    //         "bankAccountHolderType": "primary",
    //         "bankAccountType": "checking",
    //         "bankAccountNumber": "123456",
    //         "bankCode": "HBUK",
    //         "gatewayName": "stripe",
    //         "processorName": "test processor",
    //         "processorPaymentReference": "string",
    //         "gatewayReference": "string"
    //       }
    //     }
    //   ]
    // }

    json = CkJsonObject_Create();
    CkJsonObject_UpdateString(json,"updates[0].giftCommitmentId","<SFDC_GIFT_COMMITMENT_ID>");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.type","credit card");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.accountHolderName","test donor 1");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.expiryMonth","10");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.expiryYear","2026");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.last4","4585");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.cardBrand","visa");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.bankName","chase");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.digitalWalletProvider","apple pay");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.bankAccountHolderType","primary");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.bankAccountType","checking");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.bankAccountNumber","123456");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.bankCode","HBUK");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.gatewayName","stripe");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.processorName","classy");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.processorPaymentReference","string");
    CkJsonObject_UpdateString(json,"updates[0].paymentInstrument.gatewayReference","string");
    CkJsonObject_UpdateString(json,"updates[1].giftCommitmentId","<SFDC_GIFT_COMMITMENT_ID>");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.type","credit card");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.accountHolderName","test donor 2");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.expiryMonth","10");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.expiryYear","2026");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.last4","4585");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.cardBrand","visa");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.bankName","chase");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.digitalWalletProvider","apple pay");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.bankAccountHolderType","primary");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.bankAccountType","checking");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.bankAccountNumber","123456");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.bankCode","HBUK");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.gatewayName","stripe");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.processorName","test processor");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.processorPaymentReference","string");
    CkJsonObject_UpdateString(json,"updates[1].paymentInstrument.gatewayReference","string");

    // Adds the "Authorization: Bearer <access_token>" header.
    CkHttp_putAuthToken(http,"<access_token>");

    resp = CkHttp_PostJson3(http,"https://domain.com/services/data/v{{version}}/connect/fundraising/commitments/payment-updates","application/json",json);
    if (CkHttp_getLastMethodSuccess(http) == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        CkJsonObject_Dispose(json);
        return;
    }

    sbResponseBody = CkStringBuilder_Create();
    CkHttpResponse_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObject_Create();
    CkJsonObject_LoadSb(jResp,sbResponseBody);
    CkJsonObject_putEmitCompact(jResp,FALSE);

    printf("Response Body:\n");
    printf("%s\n",CkJsonObject_emit(jResp));

    respStatusCode = CkHttpResponse_getStatusCode(resp);
    printf("Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        printf("Response Header:\n");
        printf("%s\n",CkHttpResponse_header(resp));
        printf("Failed.\n");
        CkHttpResponse_Dispose(resp);
        CkHttp_Dispose(http);
        CkJsonObject_Dispose(json);
        CkStringBuilder_Dispose(sbResponseBody);
        CkJsonObject_Dispose(jResp);
        return;
    }

    CkHttpResponse_Dispose(resp);

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "successes": 2,
    //   "failures": 0,
    //   "notProcessed": 0,
    //   "details": [
    //     {
    //       "success": true,
    //       "links": {
    //         "giftcommitment": {
    //           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>",
    //           "id": "<SFDC_GIFT_COMMITMENT_ID>"
    //         },
    //         "paymentinstrument": {
    //           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>",
    //           "id": "<SFDC_PAYMENT_INSTRUMENT_ID>"
    //         }
    //       }
    //     },
    //     {
    //       "success": true,
    //       "links": {
    //         "giftcommitment": {
    //           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>",
    //           "id": "<SFDC_GIFT_COMMITMENT_ID>"
    //         },
    //         "paymentinstrument": {
    //           "href": "/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>",
    //           "id": "<SFDC_PAYMENT_INSTRUMENT_ID>"
    //         }
    //       }
    //     }
    //   ]
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    successes = CkJsonObject_IntOf(jResp,"successes");
    failures = CkJsonObject_IntOf(jResp,"failures");
    notProcessed = CkJsonObject_IntOf(jResp,"notProcessed");
    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"details");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        success = CkJsonObject_BoolOf(jResp,"details[i].success");
        Href = CkJsonObject_stringOf(jResp,"details[i].links.giftcommitment.href");
        Id = CkJsonObject_stringOf(jResp,"details[i].links.giftcommitment.id");
        PaymentinstrumentHref = CkJsonObject_stringOf(jResp,"details[i].links.paymentinstrument.href");
        PaymentinstrumentId = CkJsonObject_stringOf(jResp,"details[i].links.paymentinstrument.id");
        i = i + 1;
    }



    CkHttp_Dispose(http);
    CkJsonObject_Dispose(json);
    CkStringBuilder_Dispose(sbResponseBody);
    CkJsonObject_Dispose(jResp);

    }

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '{
  "updates": [
    {
      "giftCommitmentId": "<SFDC_GIFT_COMMITMENT_ID>",
      "paymentInstrument": {
        "type": "credit card",
        "accountHolderName": "test donor 1",
        "expiryMonth": "10",
        "expiryYear": "2026",
        "last4": "4585",
        "cardBrand": "visa",
        "bankName": "chase",
        "digitalWalletProvider": "apple pay",
        "bankAccountHolderType": "primary",
        "bankAccountType": "checking",
        "bankAccountNumber": "123456",
        "bankCode": "HBUK",
        "gatewayName": "stripe",
        "processorName": "classy",
        "processorPaymentReference": "string",
        "gatewayReference": "string"
      }
    },
    {
      "giftCommitmentId": "<SFDC_GIFT_COMMITMENT_ID>",
      "paymentInstrument": {
        "type": "credit card",
        "accountHolderName": "test donor 2",
        "expiryMonth": "10",
        "expiryYear": "2026",
        "last4": "4585",
        "cardBrand": "visa",
        "bankName": "chase",
        "digitalWalletProvider": "apple pay",
        "bankAccountHolderType": "primary",
        "bankAccountType": "checking",
        "bankAccountNumber": "123456",
        "bankCode": "HBUK",
        "gatewayName": "stripe",
        "processorName": "test processor",
        "processorPaymentReference": "string",
        "gatewayReference": "string"
      }
    }
  ]
}'
https://domain.com/services/data/v{{version}}/connect/fundraising/commitments/payment-updates

Postman Collection Item JSON

{
  "name": "Update Commitment Payments",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 1\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"classy\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    },\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 2\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "connect",
        "fundraising",
        "commitments",
        "payment-updates"
      ]
    },
    "description": "Update the future payment instrument metadata for active gift commitments.\n\n## Required Attributes:\n\n- giftCommitmentId\n    \n- paymentInstrument.type"
  },
  "response": [
    {
      "name": "Status201-UpdateCommitmentSuccess",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 1\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"classy\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    },\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 2\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments",
            "payment-updates"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"successes\": 2,\n  \"failures\": 0,\n  \"notProcessed\": 0,\n  \"details\": [\n    {\n      \"success\": true,\n      \"links\": {\n        \"giftcommitment\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n          \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n        },\n        \"paymentinstrument\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n          \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n        }\n      }\n    },\n        {\n      \"success\": true,\n      \"links\": {\n        \"giftcommitment\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n          \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n        },\n        \"paymentinstrument\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n          \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n        }\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Status200-UpdateCommitmentRequestValidationFailure",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitmentId\": \"INVALID COMMITMENT ID\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 1\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"classy\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    },\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor 2\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments",
            "payment-updates"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"successes\": 1,\n  \"failures\": 1,\n  \"notProcessed\": 0,\n  \"details\": [\n    {\n        \"success\": false,\n        \"errors\": {\n            \"field\": \"id\",\n            \"message\": \"<invalid id message>\"\n        }\n    },\n    {\n      \"success\": true,\n      \"links\": {\n        \"giftcommitment\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n          \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n        },\n        \"paymentinstrument\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n          \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n        }\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Status200-UpdateCommitmentDatabaseFailure",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"classy\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    },\n        {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"google pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments",
            "payment-updates"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "// This is a scenario where there is a validation rule on the Payment Instrument object requiring that the digitalWalletProvider cannot be \"Apple Pay\". One database error occurs for the 10.50 cover amount, causing the other two to be rolled back with success of false and no record links.\n{\n  \"successes\": 0,\n  \"failures\": 1,\n  \"notProcessed\": 1,\n  \"details\": [\n    {\n        \"success\": false,\n        \"errors\": {\n            \"message\": \"<validation_rule_error_message>\"\n        }\n    },\n    {\n      \"success\": false\n    }\n  ]\n}"
    },
    {
      "name": "Status201-UpdateCommitmentExternalIds",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitment\": {\n        \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        }\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"david chavez\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"classy\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    },\n    {\n    \"giftCommitment\": {\n        \"externalId\": {\n            \"fieldName\": \"<EXTERNAL_ID_FIELD_NAME>\",\n            \"fieldValue\": \"<EXTERNAL_ID_FIELD_VALUE>\"\n        }\n      },\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"luke smith\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments",
            "payment-updates"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"successes\": 2,\n  \"failures\": 0,\n  \"notProcessed\": 0,\n  \"details\": [\n    {\n      \"success\": true,\n      \"links\": {\n        \"giftcommitment\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n          \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n        },\n        \"paymentinstrument\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n          \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n        }\n      }\n    },\n        {\n      \"success\": true,\n      \"links\": {\n        \"giftcommitment\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_GIFT_COMMITMENT_ID>\",\n          \"id\": \"<SFDC_GIFT_COMMITMENT_ID>\"\n        },\n        \"paymentinstrument\": {\n          \"href\": \"/services/data/vXX.X/sobjects/sObject/<SFDC_PAYMENT_INSTRUMENT_ID>\",\n          \"id\": \"<SFDC_PAYMENT_INSTRUMENT_ID>\"\n        }\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Status400-BadRequestError",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"updates\": [\n    {\n      \"giftCommitmentId\": \"<SFDC_GIFT_COMMITMENT_ID>\",\n      \"paymentInstrument\": {\n        \"type\": \"credit card\",\n        \"accountHolderName\": \"test donor\",\n        \"expiryMonth\": \"10\",\n        \"expiryYear\": \"2026\",\n        \"last4\": \"4585\",\n        \"cardBrand\": \"visa\",\n        \"bankName\": \"chase\",\n        \"digitalWalletProvider\": \"apple pay\",\n        \"bankAccountHolderType\": \"primary\",\n        \"bankAccountType\": \"checking\",\n        \"bankAccountNumber\": \"123456\",\n        \"bankCode\": \"HBUK\",\n        \"gatewayName\": \"stripe\",\n        \"processorName\": \"test processor\",\n        \"processorPaymentReference\": \"string\",\n        \"gatewayReference\": \"string\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/fundraising/commitments/payment-updates",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "fundraising",
            "commitments",
            "payment-updates"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json",
          "description": ""
        }
      ],
      "cookie": [
      ],
      "body": "    // Even if the JSON request is valid, this is an example of a 400 error code that will be returned if duplicate matching rules are not active. Any non 200 error code would have a similar response structure.\n    {\n        \"errorCode\": \"UNKNOWN_EXCEPTION\",\n        \"message\": \"Provide active duplicate matching rules on Account and Person Account for donor matching. -- industries.fundraisingops.connect.impl.validator.ValidatorUtil.validateMatchingMethod(ValidatorUtil.java:103)\"\n    }"
    }
  ]
}