QorePay logo
QorePay logo

Server to Server - Bank Transfer

Introduction

Server-to-Server ("S2S") integration allows running payments on the server level without direct interaction between the client’s browser or application and API.

Step 1: Initiate Purchase

The first step in accepting bank transfer payments is to call the /purchases endpoint below. The return object will include the direct_post_url parameter. This parameter will be used in the next step.

RequestURL

POST

https://gate.qorepay.com/api/v1/purchases/

JSON

 {
  brand_id: '409eb80e-3782-4b1d-afa8-b779759266a5'
  client: {
    email: '[email protected]', 
  },
  purchase: {
    currency: 'NGN',
    products: [
      {
        name: 'Dog food Max',
        quantity: 1, 
        price: 9000
      }
    ], 
  },   
}

Step 2: Generate One Time Account

The next step is to retrieve a one time virtual account. Subsequently, the client will execute a transfer using the precise amount indicated in the first step to the account number acquired in this step.

x-www-form-urlencoded

  "s2s": "true",
  "pm": "sarepay_bank_transfer"

Sample Response Body

JSON


{
  "data": {
    "account_number": "77777777",
    "account_name": "Test Onetime",
    "bank": "Wema",
    "status": "Active",
    "type": "Corporate",
    "expires_at": "2023-09-04 00:21:48",
    "validity_type": "Onetime"
  }
}

Step 4: Verify Payment

When the system receives payment, you'll be notified via a webhook. You can also query the https://gate.qorepay.com/api/v1/purchases/{id} endpoint to get the payment status.