Payment Links
what are payment links? payment links allow datacap partners to accept payments without building an additional standalone website or application send payment links via sms, e mail or both urls type url certification https //paylink cert dcap com/api/v1/ production https //paylink dcap com/api/v1/ authorization for payment links the authorization is the same as v2 pay api which consists of basic authorization on all endpoints as authorization basic base64(ecommercemid\ apikey) api key acquired via the endpoint /acquireinitialapikey # and rotated via the endpoint /acquireapikey # refer to pay api authorization docid\ btc4m25d3m2uhbalhtjpx for more info headers payment links api only accepts json the following headers are required headers { 'content type' 'application/json', // json is required 'authorization' `basic ${encodedauth}`, // basic authentication 'accept' 'application/json', // json accepted back }, creating a payment link a payment link post request consists of 6 objects transactionproperties will contain information about the transaction like amount, tip, and line items displayproperties contains properties that control the look and feel of the resulting payment page paymenttypesallowed enumerates different types of datacap mids that will be used for the payment request apikeys (optional) is used for integrators to bring their own sms provider account (twilio supported today) communicationmethods (optional) enumerates through different ways to automatically send the payment link to the customer (email,sms) webhookendpoints (optional) will contain webhook urls and desired webhook events to be returned to the webhook page example post request body outline { \<font color="#b91c1c"> \</font> "transactionproperties" { // transactionproperties # sub properties here }, \<font color="#b91c1c"> \</font> "displayproperties" { // displayproperties # sub properties here }, \<font color="#b91c1c"> \</font> "paymenttypesallowed" \[ // paymenttypesallowed # sub properties here ], "apikeys" { // apikeys # sub properties here }, "communicationmethods" \[ // communicationmethods # sub properties here ], "webhookendpoints" \[ // "url" " url to receiver docid\ lyh3gi76xlxa67uobckv4 " , "events" webhook events docid\ lyh3gi76xlxa67uobckv4 ] \<font color="#b91c1c"> \</font> fields required operations payment link operations operation http method url generate payment link post /paymentrequest update payment link put /credit/sale/paymentrequest/{requestid} cancel payment put /paymentrequest/{requestid}/cancel mark link as paid put /paymentrequest/{requestid}/markaspaid resend payment link put /paymentrequest/{requestid}/sendcommunication find sent payment links get /paymentrequest/merchant request full access to payment links get started request developer credentials for free access to every product's integration guide