Skip to content

Suggested

API Dashboard

PaymentsPeer to peer payment - P2P

Peer to peer payment - P2P

You can use payment-attempts or create the payment directly.

Note

You can use payment-attempts or create the payment directly.

A P2P (peer-to-peer) transaction is used to transfer funds between service providers or organizations. This is ideal for internal transfers, operator-to-operator flows, or any case where both origin and destination are known entities. Although similar in structure to PURCHASE, it must not be used for customer payment flows.

01
Origin account

Identify the internal account that sends funds.

02
Destination account

Attach the receiving internal identity and account.

03
Create payment

Submit the P2P transaction payload.

04
Capture

Finalize the internal transfer.

Create payment

Creates a P2P transaction by specifying the origin and destination accounts, both belonging to known internal identities.

Request
POST /sandbox/payments HTTP/1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json

{
  "identityId": "67f21a61d6d09fcbb4e84631",
  "externalId": "p2p-transfer-001",
  "accountNumber": "1743919714051743919010211",
  "product": "COP:COP",
  "type": "P2P",
  "purchaseAmount": "15000.00",
  "purchaseCurrency": "COP",
  "currency": "COP",
  "origins": [
    {
      "type": "ACCOUNT",
      "currency": "COP",
      "identity": {
        "identityId": "67f21a61d6d09fcbb4e84631"
      },
      "account": {
        "accountNumber": "1743919714051743919010211"
      }
    }
  ],
  "destinations": [
    {
      "type": "ACCOUNT",
      "amount": "15000.00",
      "currency": "COP",
      "identity": {
        "identityId": "67f21d17d6d09fcbb4e84632"
      },
      "account": {
        "accountNumber": "17439204080520250406060905072"
      }
    }
  ]
}
Response
{
  "id": "<PAYMENT_ID>",
  "type": "P2P",
  "status": "CREATED"
}
Capture payment

Capture the P2P transaction to finalize the transfer between entities.

Request
POST /sandbox/payments/{PAYMENT_ID}/captured HTTP/1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Accept: application/json
Response
{
  "id": "<PAYMENT_ID>",
  "status": "CAPTURED"
}
Webhook simulation

Simulate a webhook event to confirm the P2P transaction has been received or processed.

Request
POST /sandboxwebhook/payments/received/payment-provider HTTP/1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json

{
  "id": "<PAYMENT_ID>"
}
Response
{
  "ok": true
}
Check account information

Verify the origin or destination account at any time to ensure correctness.

Request
GET /sandbox/accounts?accountNumber=1743919714051743919010211 HTTP/1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Accept: application/json
Response
{
  "id": "<ACCOUNT_ID>",
  "accountNumber": "1743919714051743919010211",
  "availableFunds": "15000.00",
  "currency": "COP",
  "status": "ACTIVE"
}