Welcome to Zuora Product Documentation

Explore our rich library of product information

Create a payment method API operation

This task guides you through creating payment methods in batches using the "CRUD: Create a payment method" API operation, including preparing a CSV file, setting up a Postman collection, and executing the API request.

To create payment methods in batches with existing mandate IDs through the “CRUD: Create a payment method” API operation, perform the following steps. Detailed instructions for each step are provided in the later sections of this article.

  1. Prepare a CSV file containing the data of the payment methods to be created.
  2. In Postman, create a collection and an API request for Zuora’s “CRUD: Create a payment method” API operation . In the following sections, a “Test bulk create PM” collection and a “Create BankTransfer Payment Method” API request will be created, as an example.
  3. In Postman, edit the configuration of your collection and run the collection .
  4. In Postman, check the result in the response section .

Prepare a CSV file containing the data of the payment methods to be created. Use the field names as the column headers. Ensure that all the following fields and data are included in the CSV file:

  • All the required fields for creating the payment methods. See the field description of the CRUD: Create a payment method API operation.

  • The TokenId (for Bank Transfer) or the MandateID (for ACH) field. Fill your existing GoCardless mandate IDs in the TokenId or the MandateID column of each payment method.

  • Other allowed fields that you want to save in Zuora for the payment methods.

The following image provides an example of the CSV file prepared for BECS payment methods.

csv sample.png
  1. Log in to Postman and open your Workspace.

  2. Create a collection:

    1. Click New > Collection .

    2. Rename the new collection to “Test bulk create PM”.

  3. Create an API request in the collection:

    1. In the left navigation pane, click the “Test bulk create PM” collection you just created to expand it.

    2. In the expanded message, click Add a request .

    3. create-collection.png
  4. Save your request.

  1. run-collection.png
  2. On the Runner tab, edit the settings:

    • In the Data section, click Select File and add the CSV file you prepared.

    • Click Advanced settings to expand the section if it is collapsed, and then select Save responses and Keep variable values .

  3. runner.png

All the requests executed are listed for the collection and you can check the response by clicking each of the requests.

result.png