I am trying to get payments set up with Stripe using the Java eSignature REST API.
There are many different examples online and I've tried several of them. I can get the "Pay Now" button to appear on the sent document, but every time it's clicked it pops up an Error box: "Payment set up failed".
I am also putting the field at an anchor text in a composite template, if that's pertinent.
What area of the setup should I be looking at to determine why "set up" failed?
I am using a test Stripe account created using "Skip this account form" as indicated by https://developers.docusign.com/esign-rest-api/code-examples/code-example-payments
Number numberTab = new Number()
.value("250")
.tabLabel("numberTab")
.anchorString("LineItemTest")
.anchorIgnoreIfNotPresent("false")
.anchorXOffset("1")
.anchorYOffset("0")
.anchorUnits("inches")
.documentId(tCompositeTemplate.getDocument().getDocumentId());
PaymentLineItem lineItem = new PaymentLineItem()
.name("PaymentAmount1")
.description("Set payment Amount")
.amountReference("numberTab");
PaymentDetails payDetails = new PaymentDetails()
.total(total)
.gatewayAccountId(<the gateway account id on the Docusign Payments page for my Stripe account>)
.currencyCode("USD")
.gatewayDisplayName("Stripe")
.addLineItemsItem(lineItem)
.status("new");
FormulaTab formulaPayment = new FormulaTab()
.tabLabel("\\*PaymentTest")
.formula("550")
.roundDecimalPlaces("2")
.paymentDetails(payDetails)
.isPaymentAmount("true")
.required("true")
.locked("true")
.hidden("false")
.documentId(tCompositeTemplate.getDocument().getDocumentId())
.anchorString("PaymentTest")
.anchorIgnoreIfNotPresent("false")
.anchorXOffset("1")
.anchorYOffset("0")
.anchorUnits("inches")
.recipientId("1");