Skip to main content
Getting started

Your first Paytia request

Every call is a form-data POST with your API key in a header. The transaction_flag field decides what Paytia does with it. Here's what you need before you send one, and what comes back.

API reference menu

Before you start

In the Paytia merchant portal, create an API key with Single JSON format selected. Each Paytia account you use gets its own X-API-KEY value. The knowledge base walks through it: how to add an API key.

A working integration has to handle five things:

  • Pulling data out of your application and mapping it to the Paytia fields.
  • A webhook URL that receives status updates from Paytia.
  • A redirect URL that hands the user back to your application from the Paytia screen.
  • Exception scenarios, such as a rejected amount or a dropped call.
  • Both the positive and the negative outcome of every flow.

Hosts

Both live hosts are production and neither takes a port. There's no separate sandbox domain: a live account can still run its payment gateway in test mode.

  • https://accounts.paytia.com
  • https://accounts.pay729.net

White-label accounts use https://{subdomain}.paytia.com for /api/subscription.

Endpoints

Every /api/* call sends X-API-KEY. Paytia accepts form-data on four endpoints:

EndpointUse it to
POST /api/payment_serviceProcess a payment or card capture. Most flows live here.
POST /api/subscriptionUpdate or cancel a recurring payment plan.
POST /api/payment_updateTake or complete a two-stage payment.
POST /api/authorizeMint an ACCESS-TOKEN (Enhance Security only).

Your first request

The smallest useful call: an immediate card payment taken over the phone, with the Agent Capture Assist screen URL returned to you. Replace YOUR_API_KEY and point webhook_url at an endpoint you control.

curl --request POST \
  'https://accounts.paytia.com/api/payment_service' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --form 'reference_id="ORDER-1001"' \
  --form 'amount="20.00"' \
  --form 'agent_id="101"' \
  --form 'firstname="Jane"' \
  --form 'lastname="Smith"' \
  --form 'countrycode="GB"' \
  --form 'webhook_url="https://your-app.example/paytia"' \
  --form 'web_agent_form="1"' \
  --form 'transaction_flag="0"'
bash

reference_id has to be new on every attempt. Send one Paytia has already seen and you get 208 Reference ID Already Exist. agent_id is required on flags 0 to 3, and on flag 4 when the agent licence is active.

What comes back

A success response is flat JSON:

{
  "url": "https://accounts.paytia.com/thirdparty/embededurl/MzIz/MjEzMjEzMQ==",
  "reference_id": "2132131",
  "status_code": 200
}
json

url is the Agent Capture Assist screen. It's a plain URL, not an iframe, so open it however suits your interface: embedded in an iframe, in a popup, in a new tab or as a redirect. Always read the body as well as the HTTP status, because a duplicate reference comes back as 208 with httpStatus: false. Error codes →

The transaction flag

One endpoint covers every flow. transaction_flag picks the operation Paytia runs against your gateway:

FlagBehaviourWhat it does
0Immediate chargeCharge the full amount now.
1Capture, tokenisation onlyCapture card details and return a token. No charge, so send amount=0.00.
2Pre-auth + immediateCharge amount now and reserve reserve_amount.
3Pre-auth onlyReserve reserve_amount on the card and return a transaction token.
4Link to PayGenerate a payment link, QR code or SMS.
5RecurringSubscription or plan-based recurring charge.
6ReservedNot in use.
7Rolling reserveStripe-specific rolling reserve handling.
8Web CheckoutHosted checkout with products and shipping. Use with web_agent_form=2.
9Bank out-paymentPay out to a bank account (Acquired.com) with mode=bank.

Each flow page lists the fields that flow expects:

Outcomes arrive by webhook

The response only tells you the request was accepted. What happened to the payment reaches you later, posted to webhook_url and webhook_url_transaction. Webhook reference →

Need a hand?

Your Paytia account manager can help, or write to techsupport@paytia.com with the request you sent and the response you got. Not a customer yet? Ask about API access →

Ready to build with Paytia?

The docs are open. Keys are gated — drop us a line and we'll issue sandbox credentials so you can try every flow against a real endpoint.