List all payment requests

List all payment requests

The following code retrieves a list of the existing payment requests for the authenticated app:

curl --request GET \
     --url https://cloud.handcash.io/v2/paymentRequests \
     --header 'Accept: application/json' \
     --header 'app-id: your-app-id' \
     --header 'app-secret: your-app-secret'
const axios = require("axios").default;

const options = {
  method: 'GET',
  url: 'https://cloud.handcash.io/v2/paymentRequests',
  headers: {
    Accept: 'application/json',
    'app-secret': 'your-app-secret',
    'app-id': 'your-app-id'
  }
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});
import requests

url = "https://cloud.handcash.io/v2/paymentRequests"

headers = {
    "Accept": "application/json",
    "app-secret": "your-app-secret",
    "app-id": "your-app-id"
}

response = requests.get(url, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://cloud.handcash.io/v2/paymentRequests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["app-secret"] = 'your-app-secret'
request["app-id"] = 'your-app-id'

response = http.request(request)
puts response.read_body
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cloud.handcash.io/v2/paymentRequests', [
  'headers' => [
    'Accept' => 'application/json',
    'app-id' => 'your-app-id',
    'app-secret' => 'your-app-secret',
  ],
]);

echo $response->getBody();
{
  "items": [
    {
      "id": "9ac9182acae19902",
      "paymentRequestUrl": "https://pay.handcash.io/9ac9182acae19902",
      "paymentRequestQrCode": "<base-64-qrcode-pay-bip270-scheme>",
      "isEnabled": true,
      "product": {
        "name": "Jump · Micro",
        "description": "Play a game to Jump in the Micro division.",
        "imageUrl": "https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png"
      },
      "receivers": [
        {
          "sendAmount": 0.08,
          "currencyCode": "USD",
          "destination": "imaWinner"
        },
        {
          "sendAmount": 0.02,
          "currencyCode": "USD",
          "destination": "haste"
        }
      ],
      "requestedUserData": ["paymail"],
      "customParameters": {
        "gameId": "9ac9182acae19902"
      },
      "notifications": {
        "webhook": {
          "webhookUrl": "https://app.hastearcade.com/wehbooks/handcash"
          "customParameters": {
            "gameId": "9ac9182acae19902"
          },
        },
        "email": "[email protected]"
      },
      "redirectUrl": "https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9",
      "expirationType": "never",
      "expiresAt": 1650558683
    }
  ]
}

Check out the API Endpoint to find out more about listing payment requests.


Did this page help you?