Follow these steps to request money from a registered user using the SynchPay API.
/payment/create
endpoint. This endpoint allows you to charge the user for services rendered or products provided.
Obtain an Access Token
/payment/create
, secure an access token by making a POST
request to /auth/token
using your ClientId
and ClientSecret
.Submit a Payment Request
/payment/create
endpoint. This payload must include essential details such as the user’s
registration identifier, the company identifier, the payment amount (in
cents), a brief description, and the fee payer.Processing the Request
Receive Payment Confirmation
/payment/create
endpoint enables you to initiate a payment request by submitting a structured JSON object.
POST
Bearer <AccessToken>
Note: Obtain the access token from /auth/token
using your ClientId
and ClientSecret
.Parameter | Type | Description | Required |
---|---|---|---|
RegistrationId | string | The unique identifier for the user registration, obtained from the /user/register endpoint IMPORTANT: it is required if ContactNumber was omitted | No * |
ContactNumber | string | International format (eg +1 for US). IMPORTANT: it is required if RegistrationId was omitted | No * |
EmailAddress | string | E-mail address for notifications | No |
CompanyId | string | The unique identifier for the company requesting the payment. When missing default one will be used from integration | No |
Amount | integer | The payment amount expressed in cents. For example, $50.00 should be provided as 5000 | Yes |
ShortDescription | string | A brief description of the service or product for which payment is being requested | No |
FeePayer | string | Specifies who will cover the transaction fee. Acceptable values: "client" , "partner" , or "ask" . Value"ask" means that client can choose while accepting | Yes |
Reference | string | Reference with external system eg. payment ID | No |
Attachment | string | PDF file in base64 format | No |
DueDate | string | Due date in date only format eg “2023-05-30”. If ommited the next day will be applied | No |
EnableAutoPay | bool | Asks user for auto pay consent | No |
AutoPayLimit | integer | Auto pay limit in cents. For example, $50.00 should be provided as 5000 | No |
Metadata | object | Flat object with metadata. Example: { "additionalProp1": "foo", "additionalProp2": "bar" } | No |
RegistrationId
or ContactNumber
have to be specified.