Send the Request
Generate the Endpoint
The endpoint is essentially the Resource Path (request target) formatted as a fully qualified URL. The following example shows a properly formatted endpoint.
Endpoint for a POST Request
The proper path for a payment request contains an HTTP prefix, followed by the host and request target. Using the above endpoint as an example, we can break it down into its components.
Request target (suffix)
Endpoint for a GET Request
The proper path for a Transaction Detail contains the same prefix, host, and request target as that of a payment request. The ID that prompts the return to include a detail record for that specific transaction is added at the end of the endpoint.
Request target (suffix)
How to Handle Query Parameters
GET requests that contain no message body send name-value pairs to the server using query parameters. The following example shows the request target for a Secure File Share file list query.
The following example shows how to format this query as an endpoint with query parameters in the URL.
Query Parameters (Querystring)
The last part of the URL is the list of parameters, also called the
querystring. The querystring is a list of name-value pairs in the format of
?designates the start of a querystring. The querystring is appended to the resource. Do not use a slash between the resource and the querystring.
The following example shows signature parameters for a querystring. During the signature parameter generation, the request target must contain the full querystring.
host:apitest.cybersource.comdate: Sat, 15 Dec 2018 01:47:45 GMT (request-target): get /sfs/v1/file-details?organizationId= mymid&startDate=2018-12-10&endDate=2018-12-11 v-c-merchant-id: mymid
The following example shows a sample request target for the Secure File Share file download resource. It combines an ID and a querystring.
The following example shows the above example formatted as an endpoint.
Note that the request target and the endpoint both have an ID and a querystring.
The following example shows signature Parameters for IDs and querystrings. During the signature Parameter generation, the request target must contain the full querystring.
host:apitest.cybersource.comdate: Thu, 13 Dec 2018 01:42:46 GMT (request-target): get /sfs/v1/files/UGF5bWVudEJhdGNoRGV0YWlsUm Vwb3J0LnhtbC0yMDE4LTEyLTEw?organizationId=mymid v-c-merchant-id: mymid