Server-to-Server

Server-to-Server Integration Guide

Last updated:December 27, 2024

This guide walks you through the entire payment journey, from start to finish. As a merchant, you’ll be in full control, collecting all card and payment details directly. This behind-the-scenes process ensures a smooth and seamless experience for your shoppers. Navigate the complexities of the payment landscape with ease and efficiency, all thanks to our Server-to-Server guide. Start your journey today!

PCI-DSS Compliance: To collect card data, you must be PCI-DSS compliant. To minimize your compliance requirements, please use Primeiro Pay.
HTTP POST Requests: Remember, for an HTTP POST request, all parameters must be incorporated in the message body, not in the URL.
API Reference: Consult the API Reference for a detailed list of parameters that can be included in the payment request.

Use cases

Synchronous payment

The merchant collects card data from the shopper and initiates the synchronous payment flow.


How it works

Select your transaction flow. Be aware, some payment brands may not support your chosen flow. Check for compatibility.

Pre-authorize payment

Send the pre-authorization request with the collected card data.

Capture the payment

Send the capture request.

OPTIONAL

Manage the payment

Send the back-office payment request.

Transactions:
PA
PA
CP
CP
RF
RF
CB
CB
CR
CR
RB
RB

1. Pre-authorize payment

Initiate a server-to-server POST request with the required payment data. The payment details are verified with the issuer, and the funds are reserved. The response to a successful request is an id that should be stored and used in subsequent back-office operations.


2. Capture the payment

Initiate a server-to-server POST request over the pre-authorized payment. The reserved funds are transferred from the shopper's account to the merchant's account.

Sample request:

3. Manage the payment

Initiate a back-office server-to-server POST request over the captured payment to:

  • refund either the full captured amount or a part of the captured amount (see refund)
  • rebill the processed order for additional products (see rebill)
  • reflect the chargeback processed by the bank (see chargeback)
  • reflect the chargeback reversal processed by the bank (see chargeback)

Operation:

Sample request:

See also