Quickstart (API)

Learn how to get started using the Hands In API and create a payment

Pre-requisites

1. Obtain your API key
To get started with making API requests, you need to obtain your API key from the dashboard. Navigate to Dashboard > Developers > API keys (shown below).


Now copy your Sandbox API key and make sure to store it somewhere safe as this is sensitive information.

This API is sent along with every request to the API through the x-api-key header.


2. Create a payment request

You can simply send a POST request to the Multi Card API endpoint

// request 
curl --request POST \
     --url https://sandbox.handsin.com/v1/multi-card-payments \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: <your-api-key>' \
     --data '
{
  "amountMoney": {
    "currency": "USD",
    "amount": 10000
  },
  "idempotencyKey": "<randomstring>"
}
'




3. Share or embed the payment session URL

The response will return a JSON object with an url property which you can then share with your customers by either embedding it as an IFRAME on your website or via link sharing such as email or SMS.


{
  "merchantId": "your merchant ID",
  "id": "Payment Session ID",
  "status": "APPROVED",
  "url": "https://sandbox.checkout.handsin.com/m/...", // send this to your customer
  "totalMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "amountMoney": {
    "amount": 100,
    "currency": "AED"
  },
  "lineItems": [...],
  "pageOptions": {...},
}