  1. [    Home ](/)
2. [Integrations](/integrations)
3. Payment Processing Queue
 
  AMQP / RabbitMQ  

# Payment Processing Queue

 

  Overview  Channels 1   Messages 1  Documentation Connection 

 Payment instructions are submitted to a durable AMQP exchange and processed exactly once by the payment engine. Producers publish capture, refund, and reversal messages with a routing key per instruction type; the engine acknowledges after ledger commit, and failed messages dead-letter for operator review. Use this queue for any money movement that must survive restarts and burst traffic.



 

  Service type AMQP / RabbitMQ 

  Tags amqp payments queue 

  ### Channels

 `payments.instructions.q` 

 Exchange`payments.instructions`

Routing keys`payment.capture` `payment.refund` `payment.reversal` 

   ### Inline message schema

 ```
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "PaymentInstruction",
  "type": "object",
  "required": [
    "instruction_id",
    "type",
    "amount",
    "currency",
    "account_ref"
  ],
  "properties": {
    "instruction_id": {
      "type": "string",
      "format": "uuid",
      "description": "Idempotency key for the instruction."
    },
    "type": {
      "type": "string",
      "enum": [
        "capture",
        "refund",
        "reversal"
      ]
    },
    "amount": {
      "type": "number",
      "minimum": 0.01,
      "description": "Amount in major units."
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "ISO 4217 code."
    },
    "account_ref": {
      "type": "string",
      "description": "Ledger account reference."
    },
    "initiated_by": {
      "type": "string",
      "description": "Operator or system id."
    }
  }
}
```

 Sample payload Example message — placeholder values 

 ```
{
    "instruction_id": "00000000-0000-0000-0000-000000000000",
    "type": "capture",
    "amount": 0,
    "currency": "string",
    "account_ref": "string",
    "initiated_by": "string"
}
```

 

  Publish persistent messages (delivery mode 2) to the exchange with the routing key for your instruction type. Confirm-selects are enabled — wait for the broker confirm before treating an instruction as accepted. The message schema below is enforced at the consumer.



 

    Brokers `amqps://rabbit-1.payments.example.com:5671` 

Exchange`payments.instructions`

Routing keys`payment.capture` `payment.refund` `payment.reversal` 

 No specification files are attached to this integration.