Generate Payment Instructions Action

Generates payment instructions, based on source record IDs. Supports claims, payment requests, and benefit disbursements as source records.

This action is available in API version 67.0 and later.

Special Access Rules 

To access the Generate Payment Instructions action, there are required org settings and permission set licenses. For details, see Outbound Payment Prerequisites.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/generatePaymentInstruction

Where XX.X is the latest API version.

Formats: JSON

HTTP Methods: GET, POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

Inputs 

InputTypeDescription
customValuesApex-defined variableRequired.
The custom field values to apply to the payment instruction.
paymentInstrumentIdstringThe ID of the associated payment instrument record.
recordIdIDRequired.
ID of the source record. Source records can be claims, payment requests, or benefit disbursements.

Outputs 

OutputTypeDescription
errorMessagestringIf payment instruction record creation fails, an error message displays. If record creation succeeds, this field is null.
paymentInstructionIdstringThe ID of the payment instruction record.
successStatusstringThe status indicating the successful creation of payment instruction.

Example 

GET

This example shows how to get the details of the Generate Payment Instructions action type.

1curl --include --request GET \
2--header 'Authorization: Bearer 00DR...xyz' \
3--header 'Content-Type: application/json' \
4"https://instance.salesforce.com/services/data/v67.0/actions/standard/generatePaymentInstructions"

POST

Here’s a request for the Generate Payment Instructions action.

1{
2  "inputs": [
3    {
4      "recordId": "a1X5f00000ABC123",
5      "paymentInstrumentId": "9pixx0000000001AAA",
6      "customValues": {
7        "values": [
8          {
9            "fieldApiName": "priority__c",
10            "value": "High"
11          },
12          {
13            "fieldApiName": "status__c",
14            "value": "Complete"
15          }
16 ]
17      }
18    }
19  ]
20}

Here’s a response for the Generate Payment Instructions action.

1[
2    {
3        "actionName": "generatePaymentInstructions",
4        "errors": null,
5        "invocationId": null,
6        "isSuccess": true,
7        "outcome": null,
8        "outputValues": {
9            "paymentInstructionId": "1k2SG000001xWw9YAE"
10        },
11        "sortOrder": -1,
12        "version": 1
13    }
14]