Paiements

L'api de paiement Infinexia permet d'encaisser des paiements sur votre site web

Initialiser un paiement entrant

Initialise un paiement sur les différents portefeuilles disponibles sur Infinexia.

Request

Header Parameters

Content-Type

required

Type: string

Value: application/json

The type of the request body

App-id

required

Type: string

Value: app-id

Your app identifer

App-key

required

Type: string

Value: app-key

Your app key

Body Parameters

transaction_id

required

Type: string

Value: INF-12345678

Unique identifier for the transaction

wallet

required

Type: string

Value: EUR

Target wallet or currency for the payment

amount

required

Type: number

Value: 100

Amount to be processed in the transaction

currency

required

Type: string

Value: EUR

Currency of the transaction amount

call_back_url

optional

Type: string

Value: https://example.com/callback

URL to receive asynchronous transaction status updates

success_url

required

Type: string

Value: https://example.com/success

URL to redirect upon successful transaction

fail_url

required

Type: string

Value: https://example.com/fail

URL to redirect upon failed transaction

description

optional

Type: string

Value: First Payment

Description of the transaction

payee_name

optional

Type: string

Value: John

Name of the payee associated with the transaction

reference

optional

Type: string

Value: #order-1

Custom reference identifier for the transaction

Responses

200 OK

401 Unauthorized

403 Forbidden

422 Unprocessable Entity

POST https://api.infinexia.com/payment/initialize

Request samples

curl -X POST https://api.infinexia.com/payment/initialize \
    -H "Content-Type: application/json" \
    -H "App-id: YOUR_APP_ID" \
    -H "App-key: YOUR_APP_KEY" \
    -d '{
        "transaction_id": "{transaction_id}",  // Replace with your dynamic value
        "wallet": "EUR",
        "amount": 100,
        "currency": "EUR",
        "call_back_url": "string",
        "success_url": "string",
        "fail_url": "string",
        "description": "First Payment",
        "payee_name": "John",
        "reference": "#order-1"
    }'

Response samples

{
  "payment_url": "https://..?ref=order-token", //redirect the user on this payment page
  "token": "xxxx-xxxx-x-x--xx--x", // reference of the order on Infinexia
  "code": PAYMENT_INITIALIZED,
  "status": "ok",
}

Vérifier le statut

Vérification du statut d'un paiement entrant.

Request

Header Parameters

Content-Type

required

Type: string

Value: application/json

The type of the request body

App-id

required

Type: string

Value: app-id

Your app identifer

App-key

required

Type: string

Value: app-key

Your app key

Body Parameters

transaction_id

required

Type: string

Value: YOUR_UNIQUE_TRANSACTION_ID

Unique identifier for the transaction to check its status

Responses

200 OK

422 Unprocessable Entity

POST https://api.infinexia.com/payment/check-status

Request samples

curl -X POST https://api.infinexia.com/payment/check-status \
    -H "Content-Type: application/json" \
    -H "App-id: YOUR_APP_ID" \
    -H "App-key: YOUR_APP_KEY" \
    -d '{
        "transaction_id": "YOUR_UNIQUE_TRANSACTION_ID" // Replace with your dynamic value
    }'

Response samples

{
  "transaction_id": "YOUR_UNIQUE_TRANSACTION_ID",
  "status": "completed" // "completed" | "pending" | "canceled" | "expired"
  "transaction":{
    "transaction_id": "YOUR_UNIQUE_TRANSACTION_ID",
    "status": "completed" // "completed" | "pending" | "canceled" | "expired"
    "token": "xxxx-xxxx-x-x--xx--x", // reference of the order on Infinexia
    "wallet": "EUR",
    "amount": 100,
    "currency": "EUR",
    "reference": "#order-1"
    }
}

Frais et Portefeuilles disponibles

Récupération des frais de transactions et les portefeuilles disponibles pour effectuer une transaction.

Request

Header Parameters

Content-Type

required

Type: string

Value: application/json

The type of the request body

App-id

required

Type: string

Value: app-id

Your app identifer

App-key

required

Type: string

Value: app-key

Your app key

Responses

200 OK

401 Unauthorized

GET https://api.infinexia.com/payment

Request samples

curl -X GET https://api.infinexia.com/payment/check-fees \
    -H "Content-Type: application/json" \
    -H "App-id: YOUR_APP_ID" \
    -H "App-key: YOUR_APP_KEY"

Response samples

{
  "fee": 2,5 //in percent
  "assets": [
{
    "name":"Euro",
    "abbr":"EUR", // wallet identifier
    "logo":"logo_url", // URL of the logo on https://api.infinexia.com
    }
]
}