Happy Business Starts Here

How to use Mass Updater to mass upload payment?

Highlighted
Support SME

How to use Mass Updater to mass upload payment?

The feature "Invoice Settlement" has already been enabled in my tenant.

But I still don't know how to use it to mass upload payment.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Support SME

Re: How to use Mass Updater to mass upload payment?

Mass Payment Upload can be done through API. Here are the steps:

 

1)get Bearer Token
ysong-macOS:~ ysong$ curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d “client_id=xxxxxxxxxxx" --data-urlencode "client_secret=xxxxxxxxxxx" -d "grant_type=client_credentials" "https://rest.apisandbox.zuora.com/oauth/token"
{"access_token":"xxxxxxxxxxx","token_type":"bearer","expires_in":3599,"scope":"entity.xxxxxxxxxxx platform.write service.genesis.read service.genesis.write service.usage.delete service.usage.update service.usage.write tenant.xxxxx user.xxxxxxxxxxx","jti":"xxxxxxxxxxx”}
(a sample upload file will be attached with this message)
3) perform mass action
ysong-macOS:Desktop ysong$ curl -X POST -H "Authorization: Bearer xxxxxxxxxxx" -F "file=@test_mass_payment_upload.csv" -F "params={\"actionType\": \"MPU\"}" "https://rest.apisandbox.zuora.com/v1/bulk"
{
  "success" : true,
  "bulkKey" : "2c92c0fa6924505001692a45829f2b5f"
}
4) Get mass action result
ysong-macOS:Desktop ysong$ curl -X GET -H "Authorization: Bearer xxxxxxxxxxxx" -H "Content-Type: application/json" "https://rest.apisandbox.zuora.com/v1/bulk/2c92c0fa6924505001692a45829f2b5f"
{
  "actionType" : "MPU",
  "inputSize" : 2294,
  "uploadedBy" : "ying.song+ar@zuora.com",
  "uploadedOn" : "2019-02-26 06:46:32",
  "status" : "Completed",
  "startedOn" : "2019-02-26 06:46:32",
  "endedOn" : "2019-02-26 06:46:34",
  "outputSize" : 595,
  "outputURL" : "https://apisandbox-api.zuora.com/rest/api/file/2c92c08569244b5501692a458b5b0e19",
  "outputType" : "(url:.csv.zip)",
  "totalCount" : 17,
  "processedCount" : 17,
  "errorCount" : 0,
  "successCount" : 17,
  "success" : true
}
5)if there are failed records, get the result file to find out the reason why failed
e.g.
Screen Shot 2019-02-26 at 10.27.41 PM.png
 
=Some Common Errors=
External payment can use only external payment method.
-> this will happen when column “PaymentType" and "Billing Account ID" are not specified
 Account id cannot be null for electronic payments.
-> this will happen when “PaymentType=Electronic Payment” without specifying “Billing Account ID” 
For electronic payment, effective date should be today's date or the payment should fail.
-> this will happen if “PaymentType=Electronic Payment” while payment date is not today’s date
gatewayId must be specified in order to create an electronic payment.
-> this will happen if “PaymentType=Electronic Payment” without specifying “Gateway ID"





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

1 REPLY 1
Highlighted
Support SME

Re: How to use Mass Updater to mass upload payment?

Mass Payment Upload can be done through API. Here are the steps:

 

1)get Bearer Token
ysong-macOS:~ ysong$ curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d “client_id=xxxxxxxxxxx" --data-urlencode "client_secret=xxxxxxxxxxx" -d "grant_type=client_credentials" "https://rest.apisandbox.zuora.com/oauth/token"
{"access_token":"xxxxxxxxxxx","token_type":"bearer","expires_in":3599,"scope":"entity.xxxxxxxxxxx platform.write service.genesis.read service.genesis.write service.usage.delete service.usage.update service.usage.write tenant.xxxxx user.xxxxxxxxxxx","jti":"xxxxxxxxxxx”}
(a sample upload file will be attached with this message)
3) perform mass action
ysong-macOS:Desktop ysong$ curl -X POST -H "Authorization: Bearer xxxxxxxxxxx" -F "file=@test_mass_payment_upload.csv" -F "params={\"actionType\": \"MPU\"}" "https://rest.apisandbox.zuora.com/v1/bulk"
{
  "success" : true,
  "bulkKey" : "2c92c0fa6924505001692a45829f2b5f"
}
4) Get mass action result
ysong-macOS:Desktop ysong$ curl -X GET -H "Authorization: Bearer xxxxxxxxxxxx" -H "Content-Type: application/json" "https://rest.apisandbox.zuora.com/v1/bulk/2c92c0fa6924505001692a45829f2b5f"
{
  "actionType" : "MPU",
  "inputSize" : 2294,
  "uploadedBy" : "ying.song+ar@zuora.com",
  "uploadedOn" : "2019-02-26 06:46:32",
  "status" : "Completed",
  "startedOn" : "2019-02-26 06:46:32",
  "endedOn" : "2019-02-26 06:46:34",
  "outputSize" : 595,
  "outputURL" : "https://apisandbox-api.zuora.com/rest/api/file/2c92c08569244b5501692a458b5b0e19",
  "outputType" : "(url:.csv.zip)",
  "totalCount" : 17,
  "processedCount" : 17,
  "errorCount" : 0,
  "successCount" : 17,
  "success" : true
}
5)if there are failed records, get the result file to find out the reason why failed
e.g.
Screen Shot 2019-02-26 at 10.27.41 PM.png
 
=Some Common Errors=
External payment can use only external payment method.
-> this will happen when column “PaymentType" and "Billing Account ID" are not specified
 Account id cannot be null for electronic payments.
-> this will happen when “PaymentType=Electronic Payment” without specifying “Billing Account ID” 
For electronic payment, effective date should be today's date or the payment should fail.
-> this will happen if “PaymentType=Electronic Payment” while payment date is not today’s date
gatewayId must be specified in order to create an electronic payment.
-> this will happen if “PaymentType=Electronic Payment” without specifying “Gateway ID"





If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post