Alphabet BridgePayments Docs
Get started

Introduction

What the Alphabet Payment Bridge is, and how test and live keys work.

The Alphabet Payment Bridge is one payment API for Alphabet's applications and for Alphabet's clients. Your application creates a payment, sends the customer to a hosted checkout page, and learns the result through the API and signed webhooks. The bridge talks to each payment provider behind the scenes.

APS (card payments in Iraq) is the first provider. More gateways, wallets and installment providers will be added later behind the same API, so an application that integrates once does not need to integrate again when a new provider arrives.

What you build

Your side of the integration is small:

  1. Your server creates a payment with POST /api/v1/payments and gets a checkout_url.
  2. You redirect the customer to that URL. The bridge shows your application's name and logo, the amount and the order reference, then sends the customer to the provider's card page.
  3. The customer comes back to your return_url.
  4. Your server confirms the result, either from a webhook or by fetching the payment. Never trust the redirect alone.

Payment flow walks through it step by step.

Test keys and live keys

Every application has two kinds of API key:

Key Starts with Where payments go Real money
Test pk_test_ A built-in simulator of the provider No
Live pk_live_ The real provider account linked to your application Yes

The key alone decides the mode. A test key never reaches a real gateway, whichever provider account your application is linked to, so you can build and test your whole integration without real money. In test mode you choose the outcome yourself: paid, declined, cancelled or expired, and you can refund through the API. See Test mode.

Test and live payments are kept apart: a test key cannot see live payments and a live key cannot see test payments. Every payment and webhook carries its mode.

Amounts

Amounts are whole Iraqi dinars (IQD) as integers: 25000 is 25,000 IQD. There are no decimals and no fractions. Every payment also carries a currency field, which is always IQD today.

Where to go next

  • Quickstart: your first test payment in five minutes with curl.
  • Authentication: how to send your key, and how to roll it.
  • Payments: every field of the payments API.
  • Webhooks: events, signatures and retries.