3.31. /view-invoice
Introduction
To start Swift transaction use /api/v2/auth-cash/ and get receipt-id in order status response. Swift invoice in PDF is initiated through HTTPS GET request by using URLs specified below. Use HMAC-SHA1 for authentication. See Statuses.
API URLs
| Integration | Production |
|---|---|
| https://sandbox.billblend.com/checkout/view-invoice/ENDPOINTID/RECEIPTID | https://pay.billblend.com/checkout/view-invoice/ENDPOINTID/RECEIPTID |
Request Example
POST /paynet/view-invoice/6657/a5e8f278-8936-3286-aabb-c8960a5d04f4 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth realm="",oauth_version="1.0",oauth_consumer_key="test_merch",oauth_timestamp="1687518156",oauth_nonce="EozU8eCdyBO",oauth_signature_method="HMAC-SHA1",oauth_signature="bNQNq2CLuGoOrf5eji3ffj96bC0%3D" Content-Length: 140 Content-Type: application/x-www-form-urlencoded Connection: close oauth_consumer_key=test_merch &oauth_nonce=EozU8eCdyBO &oauth_signature_method=HMAC-SHA1 &oauth_timestamp=1687518156 &oauth_version=1.0
Success Response Example
HTTP/1.1 200 Server: server Date: Fri, 23 Jun 2023 11:03:05 GMT Content-Type: application/pdf;charset=utf-8 Connection: close X-XSS-Protection: 1 Strict-Transport-Security: max-age=31536000 Strict-Transport-Security: max-age=31536000 Content-Length: 34929 ... *PDF content*
Fail Response Example
HTTP/1.1 200
Server: server
Date: Fri, 23 Jun 2023 12:23:15 GMT
Content-Type: application/pdf;charset=utf-8
Connection: close
X-XSS-Protection: 1
Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000
Content-Length: 34929
...
<body>
<p>Sorry, that page doesn't exist!</p>
</body>
Postman Collection
Postman Collection is available at this link – https://doc.billblend.com/integration/API_commands/view-invoice.html#postman-collection
Request Builder
Request Builder is available at this link – https://doc.billblend.com/integration/API_commands/view-invoice.html#request-builder
| HTTP method | |
|---|---|
| endpointId | |
| receiptId | |
| version | |
| consumer key | |
| consumer secret | |
| timestamp | |
| nonce | |
| signature method |
curl -H 'Authorization: OAuth realm="",oauth_version="1.0",oauth_consumer_key="merchantlogin",oauth_signature_method="HMAC-SHA1",oauth_signature="WOJj4%2BmwdeVllFDBGjio4MIBcvc%3D"' --data 'oauth_consumer_key=merchantlogin&oauth_signature_method=HMAC-SHA1&oauth_version=1.0' 'https://sandbox.billblend.com/checkout/view-invoice/123/affb50c0-1234-1234-1234-f865d3a56d70' --output test.pdf