Skip to content
HitchPay API Docs

Simulator

Activate Account

Complete a pending foreign-currency (USD/EUR) account by assigning it an account number and flipping it to active, then dispatching the same virtual_account.created webhook

POST /v1/sandbox/activate-account

This exists so you have a fundable USD/EUR account to test against in sandbox.

Use this endpoint to

  • Finish provisioning a USD/EUR account in sandbox, where the real provider callback never fires
  • Get a fundable account number so you can test Simulate Transfer end-to-end
  • Pin a specific account number for repeatable test fixtures

Request

Body parameters

Field Type Required Description
tracking_id string Yes Returned by Generate Bank Account — see the Virtual Accounts section
account_number string No Pin a specific number (6–20 digits) for fixtures. Omit and one is generated for you

Code Samples

const response = await fetch(
  "https://sandbox.hitchpay.ng/v1/sandbox/activate-account",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({ tracking_id: "EXTACCT9F2A1B7C4D5E" })
  }
);

const data = await response.json();
console.log(data);
<?php

$ch = curl_init();

curl_setopt_array($ch, [
  CURLOPT_URL => "https://sandbox.hitchpay.ng/v1/sandbox/activate-account",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => json_encode([
    "tracking_id" => "EXTACCT9F2A1B7C4D5E"
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer YOUR_ACCESS_TOKEN",
    "Content-Type: application/json"
  ]
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
import requests

url = "https://sandbox.hitchpay.ng/v1/sandbox/activate-account"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
payload = {"tracking_id": "EXTACCT9F2A1B7C4D5E"}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Response

{
  "status": "success",
  "message": "Account activated successfully",
  "data": {
    "tracking_id": "EXTACCT9F2A1B7C4D5E",
    "account_number": "9912345678",
    "account_name": "John Sandbox",
    "bank_name": "Sandbox Bank USA",
    "bank_code": "123456789",
    "currency": "USD",
    "status": "active",
    "note": "Sandbox USD account activated. Fund it with /v1/sandbox/simulate-transfer."
  }
}

Errors

Code HTTP Meaning
NOT_ALLOWED 403 Called on the production environment — sandbox-only
INVALID_REQUEST 400 Missing tracking_id, or a malformed account_number
NOT_FOUND 404 Account doesn't exist or doesn't belong to your business
ALREADY_ACTIVE 400 Already activated — go straight to Simulate Transfer
INVALID_STATE 400 Account is in a state other than pending, e.g. failed
DUPLICATE_REQUEST 400 The account_number you supplied is already assigned

Questions? Email [email protected]. Also on GitBook.