APG PayAPG Paydocs

Transactions

Create transactions

POST/transactions

Take a payment. How the money is taken was decided when the payment token was created.

3 actionsTranCmdCompleteThreeDSTranCmdCreateTranCmdCreateFromDigitalCard

Permissions

Required permission
orders:pay

Requires the `pay` action on `orders` for the supplied runtime context

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "TranCmdCompleteThreeDS"
orderIdOrdrIdrequired

Identifier of an order.

Example ordr_9f2Kd8QpLzXw

paymentTokenIdPtknIdrequired

Identifier of a payment token.

Example ptkn_9f2Kd8QpLzXw

authorisationIdstringrequired

The authorisation the challenge belonged to, as TranCreateRspThreeDSRequired gave it.

referenceTransactionIdstring

Your own reference for this transaction.

Example your-own-reference

curl -X POST https://api.tst.au.apgpay.dev/transactions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "TranCmdCompleteThreeDS",
  "orderId": "ordr_9f2Kd8QpLzXw",
  "paymentTokenId": "ptkn_9f2Kd8QpLzXw",
  "authorisationId": "string",
  "referenceTransactionId": "your-own-reference"
}'

Responses

The response is a typed union.

Discriminated by type
type = "TranCreateRspCompleted"

A transaction, a payment taken from a customer on behalf of a merchant.

Example
{
  "type": "TranCreateRspCompleted",
  "created": {
    "type": "TranViewAttributes",
    "transactionId": "tran_9f2Kd8QpLzXw",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "customer": {
      "type": "RfndCustomerAttributes",
      "customerId": "cust_9f2Kd8QpLzXw",
      "name": "Ada Lovelace",
      "emailAddress": "ada@example.com",
      "phoneNumber": "+61400000000"
    },
    "orderId": "ordr_9f2Kd8QpLzXw",
    "referenceOrderId": "your-own-reference",
    "paymentType": "PayInFull",
    "status": "Accepted",
    "amounts": {
      "type": "TranAmountsAttributes",
      "currency": "AUD",
      "amount": 1250,
      "surcharge": 1250,
      "refunded": 1250,
      "fee": 1250
    },
    "refunds": [
      {
        "type": "RfndViewAttributes",
        "refundId": "rfnd_9f2Kd8QpLzXw",
        "subject": {
          "type": "RfndSubjectTransaction",
          "transactionId": "tran_9f2Kd8QpLzXw"
        },
        "merchantId": "mcht_9f2Kd8QpLzXw",
        "customer": {
          "type": "RfndCustomerAttributes",
          "customerId": "cust_9f2Kd8QpLzXw",
          "name": "Ada Lovelace",
          "emailAddress": "ada@example.com",
          "phoneNumber": "+61400000000"
        },
        "status": "Pending",
        "amounts": {
          "type": "RfndAmountsAttributes",
          "currency": "AUD",
          "amount": 1250,
          "transactionAmount": 1250
        },
        "orderId": "ordr_9f2Kd8QpLzXw",
        "referenceOrderId": "your-own-reference",
        "orderMetadata": {
          "yourKey": {}
        },
        "payoutId": "payout_9f2Kd8QpLzXw",
        "settlementDate": "2026-08-19",
        "attempts": 1250,
        "lastError": "string",
        "createdAt": "2026-08-19T04:21:07Z",
        "refundedAt": "2026-08-19T04:21:07Z",
        "updatedAt": "2026-08-19T04:21:07Z"
      }
    ],
    "disputes": [
      {
        "type": "DisputeViewAttributes",
        "disputeId": "dispute_9f2Kd8QpLzXw",
        "subject": {
          "type": "RfndSubjectTransaction",
          "transactionId": "tran_9f2Kd8QpLzXw"
        },
        "merchantId": "mcht_9f2Kd8QpLzXw",
        "customer": {
          "type": "RfndCustomerAttributes",
          "customerId": "cust_9f2Kd8QpLzXw",
          "name": "Ada Lovelace",
          "emailAddress": "ada@example.com",
          "phoneNumber": "+61400000000"
        },
        "status": "Pending",
        "gatewayState": "string",
        "amounts": {
          "type": "DisputeAmountsAttributes",
          "currency": "AUD",
          "amount": 1250,
          "transactionAmount": 1250
        },
        "feeAmount": {
          "type": "IsoCurrencyAmount",
          "minorCurrencyUnits": 1250,
          "currency": "AUD"
        },
        "reason": "Requested by the customer.",
        "description": "string",
        "orderId": "ordr_9f2Kd8QpLzXw",
        "referenceOrderId": "your-own-reference",
        "orderMetadata": {
          "yourKey": {}
        },
        "evidenceDueBy": "2026-08-19",
        "createdAt": "2026-08-19T04:21:07Z",
        "updatedAt": "2026-08-19T04:21:07Z"
      }
    ],
    "payoutId": "payout_9f2Kd8QpLzXw",
    "settlementDate": "2026-08-19",
    "availableOn": "2026-08-19",
    "referenceTransactionId": "your-own-reference",
    "referenceIssuerTransactionId": "your-own-reference",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses