APG PayAPG Paydocs

Payment sources

Create sources

POST/sources

Store a payment source. What kind is selected by the body's type. A card, bank account or PayTo agreement stored with scope Billing is the merchant's billing source, and needs MerchantFinancials_Update as the billing commands do.

6 actionsPsrcCmdCreateBillingCardPsrcCmdCreateBillingDirectDebitPsrcCmdCreateCardPsrcCmdCreateDirectDebitPsrcCmdCreatePayToPsrcCmdCreateTemporaryCard

Permissions

Required permission

Required action depends on the request variant. Select a variant in the request body below to see the permission it requires.

Request body

This body is a typed union. Pick a variant to see its fields, the permission it requires, and a matching example.

Discriminated by type
type = "PsrcCmdCreateBillingCard"
Required permission
merchantFinancials:update

Store the merchant's billing card

curl -X POST https://api.tst.au.apgpay.dev/sources \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "PsrcCmdCreateBillingCard",
  "card": {
    "type": "PsrcCardEntryAttributes",
    "cardNumber": "string",
    "cvc": "string",
    "expiryMonth": 6,
    "expiryYear": 2029,
    "cardHolderName": "Ada Lovelace"
  }
}'

Responses

The response is a tagged shape: type is always "PsrcCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "PsrcCreateRspAttributes"

The resource that was created.

Example
{
  "type": "PsrcCreateRspAttributes",
  "created": {
    "type": "PsrcViewCard",
    "sourceId": "psrc_9f2Kd8QpLzXw",
    "customerId": "cust_9f2Kd8QpLzXw",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "status": "Active",
    "last4": "4242",
    "bin": "424242",
    "brand": "Visa",
    "funding": "Credit",
    "expiryMonth": 6,
    "expiryYear": 2029,
    "issuerCountry": "AU",
    "currency": "AUD",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses