Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
209 views
in Technique[技术] by (71.8m points)

DocuSign Payments REST API create Tab

I am trying to create a sample formula tab in my DocuSign envelope creation for requesting a payment (REST API). I have successfully created the signHere tabs for many of our products but I am now asked to create a tab where the recipient can sign first and then make a payment. The payment gateways are set up (and tested through the normal DocuSign Account GUI) so I do not think the issue lies there.

I am getting an "Error - Please enter a valid payment amount." once I attempt to finish... but there is no prompt for a payment amount...or way to enter any amount.

Looking for something that would be close to this format:

    "<formulaTabs>" +
      "<formulaTab>" +
       "<isPaymentAmount>true</isPaymentAmount><value>125.00</value>" +
       "<tabLabel>CDSetupFee</tabLabel><documentId>1</documentId> 
        <pageNumber>4</pageNumber>" +
       "<xPosition>200</xPosition><yPosition>630</yPosition>" +
      "</formulaTab>" +
    "</formulaTabs>" +

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Formula Tab will give popup to the signer to fill the credit card/account details but on the document, nothing will be shown. So, they should use combination of Number Tab and Formula tab to show the amount on the document and get the card/account details using formula tab.

Complete JSON snippet will look like below:

Number Tab will show the Payment tab on the document, showing amount as 250 Dollars and then Formula Tab will take reference from the Number tab to calculate the total value to be shown to the customer as Popup to get credit card details.

In Formula tab, “amountReference” and “formula” is calculated using NumberTab reference.

"numberTabs": [{
    "xPosition": 268,
    "yPosition": 142,
    "documentId": "12345",
    "recipientId": "1",
    "pageNumber": 1,
    "value": 250,
    "maxLength": 4000,
    "width": 80,
    "height": 16,
    "tabLabel": "PaymentFixed 646b5192-a101-4cdc-a7e5-5e9bd1b80612",
    "paymentItemName": "Test Item Name",
    "paymentItemCode": "54321",
    "paymentItemDescription": "Test Item Details"
}],
"formulaTabs": [{
    "paymentDetails": {
        "currencyCode": "USD",
        "gatewayAccountId": "8cfb9a83-1f4c-40b1-b7a9-dd382ee0ca7d",
        "lineItems": [{
            "amountReference": "PaymentFixed 646b5192-a101-4cdc-a7e5-5e9bd1b80612",
            "name": "Test Item Name",
            "description": "Test Item Details",
            "itemCode": "54321"
        }]
    },
    "formula": "([PaymentFixed 646b5192-a101-4cdc-a7e5-5e9bd1b80612]) * 100",
    "recipientId": "1",
    "documentId": "12345",
    "tabLabel": "PaymentReceipt e47eed9a-85ca-4094-8d0f-50e51d5d1ee0",
    "xPosition": 0,
    "yPosition": 0,
    "pageNumber": 1,
    "required": true,
    "locked": true,
    "hidden": true
}]

isPaymentAmount has to be false if you are using our new PaymentsAPI with Stripe, Braintree and Authorize.Net.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...