Skip to main content

Overview

If you accept card payments through a terminal, POS system, or other external provider, you can register those transactions in SynchPay using the /cardpayment endpoint. This keeps all of your payment activity — both account-to-account and card — visible in one place. When you register a card payment, SynchPay stores the transaction details and sends a confirmation notification to the payer via SMS (and email, if provided).

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, 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.

Registering a card payment

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
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
CompanyIdstringThe SynchPay identifier for the company this payment belongs to.No
CompanyReferenceIdstringYour own external identifier for the company. Use this instead of CompanyId to look up the company by your reference.No
You can identify the company using either CompanyId or CompanyReferenceId. If your integration is linked to a single company, you can omit both — the default company from your integration is used. If your integration covers multiple companies, you must provide one of the two identifiers.

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",
  "Email": "payer@example.com",
  "PatientReferenceNumber": "PAT-10042"
}
For a multi-company integration, include the company identifier:
{
  "Amount": 7500,
  "MobileNumber": "+12025551234",
  "CardType": "Mastercard",
  "TransactionStatus": "Succeeded",
  "CompanyReferenceId": "your-location-id-123"
}

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 card payment 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’s account-to-account network, use the payment request endpoint instead.
Last modified on April 8, 2026