Quickstart
Confirm your sandbox key works, then create your first virtual account.
This guide takes about five minutes. You will use a sandbox key, so no real money moves.
Before you start
You need a Payinto business with API access enabled. If you don't have access yet, request it from Settings > API Keys & Webhooks in the dashboard.
Copy your sandbox secret key
Open Settings > API Keys & Webhooks, select the test environment, and copy the key that starts with sk_test_.
Store it in an environment variable on your server:
export PAYINTO_SECRET_KEY="sk_test_your_secret_key"Check your key
Call GET /whoami to see which business and environment your key belongs to.
curl https://api.payinto.co/api/v1/business/whoami \
--header "Authorization: Bearer $PAYINTO_SECRET_KEY" \
--header "Accept: application/json"A working key returns environment: "test":
{
"status": "success",
"message": "Business API credentials resolved successfully.",
"timestamp": 1793404800000,
"data": {
"business_id": "01964316-57cb-7284-8651-c53d3fcee694",
"business_name": "Example Merchant Ltd",
"trade_name": "Example Merchant",
"environment": "test"
}
}Create a dynamic virtual account
A dynamic virtual account is a temporary account number for one expected payment. This one expects ₦1,500.00, sent as 150000 kobo, and stays valid for 30 minutes.
curl https://api.payinto.co/api/v1/business/virtual-accounts/dynamic \
--header "Authorization: Bearer $PAYINTO_SECRET_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
"amount": 150000,
"amount_control": "Fixed",
"valid_for": 1800,
"merchant_reference": "quickstart-order-1"
}'The response includes the account_number and bank_name to show your customer.
Simulate a payment
In the dashboard's test environment, open the API Keys & Webhooks page and simulate a deposit to the account number you just created. If you have set up a webhook, you will receive virtual_account.transfer.received.