Table of contents

Technical reference documentation

About this reference

The endpoint and field reference for the Precium card API. Interactive documentation and ready-to-run request collections are linked below; the tables on this page are the quick reference for the card surface.

ResourceLink
Interactive API referencegate.reviopay.com/api/
Postman collectionServer-to-server merchant samples — request access from support@precium.com

If you cannot open the Postman collection, contact support rather than assuming you lack permission — access is granted per workspace member.

Base URL

https://gate.reviopay.com/api/v1/

Every path below is relative to that base. Test and production share this URL; the API key you send selects the environment.

Authentication

Bearer token on every request. Two keys, both from the Developers section of your dashboard.

KeyScope
Standard API keyAll endpoints on this page
S2S API keyCard data submission to a purchase's direct_post_url only
Authorization: Bearer <api_key>

Creating a purchase also requires your brand_id.

Purchases

MethodPathPurpose
POST/purchases/Create a purchase — the primary request for any integration
GET/purchases/{id}/Retrieve a purchase, including transaction_data.attempts[]
POST/purchases/{id}/charge/Charge or hold using a saved token
POST/purchases/{id}/capture/Capture a previously authorised payment
POST/purchases/{id}/release/Release funds on hold
POST/purchases/{id}/refund/Refund a paid purchase, fully or partially
POST/purchases/{id}/cancel/Cancel a pending purchase
POST/purchases/{id}/mark_as_paid/Mark a purchase paid — for payments settled outside Precium
POST/purchases/{id}/delete_recurring_token/Delete the token stored against this purchase
POST/purchases/{id}/resend_invoice/Re-send the invoice email

Creating a purchase — request fields

Three fields are required: a client (as client_id or an inline client object), purchase, and brand_id.

FieldTypeRequiredNotes
brand_idstring (uuid)YesFrom your dashboard
client_idstring (uuid)Either this…An existing client
clientobject…or thisInline client; found or created by email
purchaseobjectYesContainer for currency, products, language
purchase.currencystringYesISO 4217, e.g. ZAR
purchase.productsarrayYesEach item needs name and price
purchase.products[].priceintegerYesIn cents. 149900 = R1,499.00
referencestringNoYour own order identifier
skip_capturebooleanNoAuthorise only. With a zero total, becomes preauthorisation
force_recurringbooleanNoStore the card; the purchase id becomes the token
payment_method_whitelistarrayNoRestrict accepted methods
send_receiptbooleanNoEmail a receipt on payment
success_redirectstring (url)No**Required together with failure_redirect for direct post
failure_redirectstring (url)No*See above
cancel_redirectstring (url)NoWhere a cancelled payment returns
success_callbackstring (url)NoPer-purchase callback. Verify with GET /public_key/
dueintegerNoDue date, Unix timestamp
purchase.due_strictbooleanNoBlock payment after the due date

Booleans must be sent as booleans, not strings — true, not "true". The same applies to amounts: integers, not quoted numbers.

Response fields worth keeping

FieldNotes
idThe purchase id. Also the card token when is_recurring_token is true
statusSee the lifecycle table in the Integration guide
checkout_urlPrecium-hosted payment page
direct_post_urlCard submission endpoint. Null unless both redirects were supplied
is_recurring_tokenTrue once a card has been stored against this purchase
refund_availabilityall, full_only, partial_only, pis_all, pis_partial or none
refundable_amountAmount still available to refund
transaction_data.attempts[]Attempt history, newest first. .error carries the failure code
marked_as_paidTrue if settled via /mark_as_paid/ rather than through the gateway

Direct post fields

Posted to a purchase's direct_post_url. Add ?s2s=true for server-side submission with the S2S key.

FieldFormat
pmPayment method, e.g. visa
cardholder_nameLatin letters, space, apostrophe, dot, dash. Max 30
card_numberDigits only, no whitespace. Max 19
expiresMM/YY — two digits, slash, two digits
cvc3 or 4 digits
remember_cardon to store the card

Validation failures are returned as payment failures, so validate client-side first.

Clients

MethodPathPurpose
POST/clients/Create a client. email required and unique
GET/clients/List clients. Filter with q, email or phone
GET/clients/{id}/Retrieve a client
PUT / PATCH/clients/{id}/Replace or partially update
DELETE/clients/{id}/Delete a client
GET/clients/{id}/feed/Purchases and refunds for this client
GET/clients/{id}/recurring_tokens/Stored cards
GET / DELETE/clients/{id}/recurring_tokens/{token_id}/Retrieve or remove a stored card

Client fields include email, full_name, phone, personal_code (identity number, used for DebiCheck), billing and shipping address fields, bank_account, bank_code, and cc / bcc arrays for receipt copies.

Payment methods

GET /payment_methods/?brand_id={brand_id}&currency=ZAR

Returns the methods actually enabled for that brand and currency. Send it with the same key you will create the purchase with — the key determines whether the lookup runs against test or live configuration. Prefer this over a hard-coded list.

Webhooks

MethodPathPurpose
POST/webhooks/Create a webhook. Requires title, callback, events
GET/webhooks/List webhooks
GET/webhooks/{id}/Retrieve a webhook, including its public_key
PUT / PATCH/webhooks/{id}/Replace or partially update
DELETE/webhooks/{id}/Delete a webhook
GET/webhooks/deliveries/Delivery history for one object

/webhooks/deliveries/ requires both id and source_type — the latter being Purchase, Payment, Payout or BillingTemplateClient. It returns every attempt, including failures and retries.

Callback verification

GET /public_key/

Returns the PEM-encoded RSA public key for verifying per-purchase success_callback payloads. For webhook subscriptions, use public_key on the webhook object instead.

Every callback carries an X-Signature header: a base64-encoded RSA PKCS#1 v1.5 signature of the SHA-256 digest of the raw request body. Verify the raw bytes before parsing.

Reporting

MethodPathPurpose
GET/balance/Balance data
GET/account/json/balance/Company balance
GET/account/json/turnover/Company turnover
POST/company_statements/Schedule statement generation
GET/company_statements/List generated statements

Reconciliation file formats and settlement reporting are covered in Reconciliation.

Conventions

TopicBehaviour
AmountsIntegers, in cents, always
IdentifiersUUIDs
TimestampsUnix seconds on request fields; ISO 8601 on responses
PaginationCursor-based: results with next and previous. Follow next
Rate limits100 requests per minute, bursting to 200. X-RateLimit-* headers on every response
IdempotencyNo idempotency key. A purchase may be paid only once; repeats return 409
Trailing slashesRequired. Paths are case-sensitive — /purchases/, never /Purchases/

Status codes

CodeMeaning
200 / 201Success / created
204Deleted
400Validation error, or a failed capture, release or refund — check the error code
401Invalid or missing API key
403Key valid but not permitted for this operation or brand
404Not found — often a case-sensitivity or trailing-slash error
409Conflict; typically an already-paid purchase
429Rate limited
500Server error. Safe to retry idempotent reads

Full error codes with causes and retry guidance are in Error mapping; issuer decline codes are in Issuer response codes.