PSPG PayLink API

Get started with docs

  • 1. Call pspg_create_paylink()
  • 2. PSPG creates a new row in wp_pspg_orders
  • 3. PSPG generates a public PayLink URL
  • 4. PSPG stores paylink.create event in logs
  • 5. User opens the public link and starts payment
  • 6. PSPG updates status after payment flow continues through the public PayLink route
  • Single link — one payment flow per link
  • Unlimited link — reusable payment link
$result = pspg_create_paylink(
	array(
		'bank'          => 'arca_idbank',
		'currency_code' => 'AMD',
		'amount'        => '10.00',
		'link_mode'     => 'single',
		'purpose'       => 'Order payment',
		'description'   => 'Single PayLink',
	)
);

Expected result:

{
	"ok": true,
	"pspg_order_id": 123,
	"paylink_url": "https://example.com/pspg/paylink/123/abcdef1234567890",
	"bank": "arca_idbank",
	"currency_code": "051",
	"amount": "10.00",
	"link_mode": "single",
	"purpose": "Test payment",
	"description": "Test PayLink",
	"test_mode": 1
}
$result = pspg_create_paylink(
	array(
		'bank'          => 'arca_idbank',
		'currency_code' => 'AMD',
		'amount'        => '10.00',
		'link_mode'     => 'unlimited',
		'purpose'       => 'Donation',
		'description'   => 'Unlimited PayLink',
	)
);

Expected result:

{
	"ok": true,
	"pspg_order_id": 123,
	"paylink_url": "https://example.com/pspg/paylink/123/abcdef1234567890",
	"bank": "arca_idbank",
	"currency_code": "051",
	"amount": "10.00",
	"link_mode": "unlimited",
	"purpose": "Donation",
	"description": "Unlimited PayLink",
	"test_mode": 1
}
  • ok — PayLink was created successfully
  • pspg_order_id — internal PSPG order number in wp_pspg_orders
  • paylink_url — ready-to-use public payment link
  • bank — selected PSPG bank id
  • currency_code — normalized numeric ISO currency code
  • amount — normalized amount stored in PSPG
  • link_mode — PayLink type: single or unlimited
  • purpose — optional internal purpose label
  • description — public/admin description of the link
  • test_mode — bank mode derived from bank settings
  • created — PayLink row exists, but public payment flow has not started yet
  • registered — bank order was already initiated
  • paid — payment completed successfully

Available bank IDs

  • ameria — Ameriabank
  • ineco — Inecobank
  • amio — AMIO Bank
  • arca_acba — ACBA Bank (ArCa)
  • arca_ararat — Araratbank (ArCa)
  • arca_armeconombank — Armeconombank (ArCa)
  • arca_armswiss — Armswissbank (ArCa)
  • arca_ardshin — Ardshinbank (ArCa)
  • arca_byblos — Byblos Bank Armenia (ArCa)
  • arca_converse — Converse Bank (ArCa)
  • arca_evoca — Evocabank (ArCa)
  • arca_fastbank — Fast Bank (ArCa)
  • arca_idbank — IDBank (ArCa)
  • bank, currency_code, amount, and description are required
  • currency_code accepts both alpha and numeric values, for example AMD or 051
  • link_mode supports only single and unlimited
  • test_mode is derived automatically from bank settings
  • PayLink metadata is always stored in logs as paylink.create event
  • For debugging and support, use pspg_order_id and check the log field in wp_pspg_orders