Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidocs.synchpay.dev/llms.txt

Use this file to discover all available pages before exploring further.

Currently being updated for new endpoint logic

Overview

If you process card payments through a terminal, POS system, or other external provider, you can register those transactions in SynchPay using the /cardpayment endpoint to keep all payment activity visible in one place.

How it works

1

Obtain an access token

Authenticate by making a POST request to /auth/token with your ClientId and ClientSecret.
2

Register the card payment

Send a POST request to /cardpayment with the transaction details — amount, card type, transaction status, merchant identifier, and the payer’s mobile number.
3

Payer receives notification

SynchPay sends the payer an SMS (and email, if provided) confirming the card payment was recorded.

Endpoint

  • URL: https://api.synchpay.com/cardpayment
  • Method: POST
  • Authorization: Bearer <AccessToken>

Request body

ParameterTypeDescriptionRequired
AmountintegerThe payment amount in cents. For example, $50.00 should be provided as 5000.Yes
MobileNumberstringThe payer’s phone number in international format (e.g., +12025551234).Yes
CardTypestringThe type of card used for the payment (e.g., Visa, Mastercard, Amex).Yes
TransactionStatusstringThe status of the card transaction. Allowed values: Pending, Succeeded, Failed, Cancelled, Refunded.Yes
MerchantIdstringThe identifier for the merchant associated with this card payment.Yes
EmailstringThe payer’s email address. If provided, SynchPay sends an email notification in addition to SMS.No
PatientReferenceNumberstringAn optional reference number for the payer in your system (e.g., a patient ID).No

Transaction statuses

StatusDescription
PendingThe card transaction is still being processed.
SucceededThe payment was completed successfully.
FailedThe payment failed (e.g., declined card).
CancelledThe payment was cancelled before completion.
RefundedThe payment was refunded after a successful charge.

Example request

{
  "Amount": 7500,
  "MobileNumber": "+12025551234",
  "CardType": "Visa",
  "TransactionStatus": "Succeeded",
  "MerchantId": "merchant-001",
  "Email": "payer@example.com",
  "PatientReferenceNumber": "PAT-10042"
}

Response

A successful request returns 200 OK with no response body.

Error responses

Status codeCause
400Validation failed (e.g., missing required field, invalid status).
401Missing or invalid access token.
422Business rule violation (e.g., company not found for given identifier).

When to use this endpoint

Use the /cardpayment endpoint when you want to:
  • Consolidate reporting — See card and account-to-account payments in one place.
  • Enable payer notifications — Let payers receive SMS or email confirmations for card payments processed outside SynchPay.
  • Track card transactions — Keep a record of external card payments alongside your SynchPay payment activity.
This endpoint records card transactions that were processed by an external provider. It does not process card payments directly. To collect a payment through SynchPay, use the payment request endpoint instead.
Last modified on April 24, 2026