Create payment tokens
/payment-tokensIssue a payment token. The payment method is selected by the body's type.
PtknCmdCreateFromApplePayPtknCmdCreateFromBankAccountPtknCmdCreateFromCardPtknCmdCreateFromGooglePayPtknCmdCreateFromPayToPtknCmdCreateFromSavedSourcePermissions
paymentTokens:createRequires the `create` action on `paymentTokens` for the supplied runtime context
Request body
This body is a typed union. Pick a variant to see its fields and a matching example.
typetype = "PtknCmdCreateFromApplePay"An amount in minor current units of a given currency.
typeenumrequiredIsoCurrencyAmountminorCurrencyUnitsinteger (int64)requiredThe amount in minor currency units (e.g. cents for AUD).
Example 1250
currencyIsoCurrencyrequiredThe currency of the given amount as a 3 letter ISO code.
AFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
applePayPayloadstringrequiredThe paymentData object Apple returns to your page, passed through unchanged.
applePayMethodstringrequiredThe paymentMethod object Apple returns beside it, passed through unchanged.
typeDo not surcharge this payment.
Do not surcharge this payment.
Honour a quote the payer has already been shown.
The quote, exactly as POST /surcharge-quotes returned it.
typeenumrequiredSrchqViewAttributessurchargeQuoteIdSrchqIdrequiredThe quote's identity and its signature. Send it back unchanged when you take the payment.
Example srchq_9f2Kd8QpLzXw
merchantIdMchtIdrequiredIdentifier of a merchant.
Example mcht_9f2Kd8QpLzXw
The figures in a surcharge quote. All are in the single currency given here.
typeenumrequiredSrchqAmountsAttributescurrencyIsoCurrencyrequiredAFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
amountMinorUnitsrequiredThe amount before any surcharge, what you asked about.
Example 1250
surchargeMinorUnitsrequiredThe surcharge that would be added.
Example 1250
totalMinorUnitsrequiredWhat the payer would actually be charged.
Example 1250
summarystringrequiredHow the surcharge was worked out, in words a payer can be shown, 1% + $0.30 for Visa.
The payment method this quote is for. A quote is only valid for the method it was asked about.
typeApple Pay, priced from the card behind it.
The card attributes a surcharge is priced from.
typeenumrequiredSrchqCardAttributesAttributescurrencyIsoCurrencyrequiredThe currency the card is denominated in.
AFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
countryIsoCountryrequiredThe country the card was issued in.
AFAXALDZASADAOAIAQAG+239 moreShow fewer
AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, KP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, CD, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
brandCardBrandrequiredVisaMasterCardAmericanExpressDinersClubDiscoverUnionPayMaestroEloMirHiper+5 moreShow fewer
Hipercard, Jcb, Electron, Uatp, Unknown
fundingCardFundingrequiredCreditDebitChargeCardPrepaidDeferredDebitUnknownprepaidbooleanrequiredWhether the card is on an anonymous prepaid programme. Not the same as funding: Prepaid, and it is priced differently.
Example true
issuerstringrequiredThe issuing bank, as the scheme names it.
binstringFirst six to eight digits, where you have them.
Example 424242
productTypeCardProductTypeConsumerCorporateUnknownschemeProductCardSchemeProductMasterCardCrPerMasterCardSigniaMasterCardDrPerIntMasterCardWorldAllStarAmericanExpressVisaCreditPersonalVisaDrPerIntDinersClubDiscoverDinersCreditComEEA+43 moreShow fewer
DinersInternational, DinersCreditPerEEA, DinersDebitComEEA, DinersDebitPerEEA, VisaDebitPersonal, VisaDebitCom, DrMasterCardPer, DrMasterCardCom, DebitMasterCardPerInt, EFTPOSPriority1, EFTPOSPriority2, JCB, JCBCreditComEEA, JCBInternational, JCBCreditPerEEA, JCBDebitComEEA, JCBDebitPerEEA, Keyfuels, LaSer, Overdrive, VisaElectronDr, VisaElectronCr, VisaElecPerInt, MaestroPer, MaestroCom, MaestroPer2, MaestroIntlCom, MaestroIntlPer, Supercharge, Sears, MasterCardComm, MasterCardBusiness, MasterCardFleet, MasterCardCorporate, MasterCardPurchase, MasterCardDrCom, VisaBusiness, VisaCommerce, VisaCorporate, VisaPurchasing, VisaDrComIntl, UATP, Unknown
A bank transfer the payer makes themselves.
A bank transfer the payer makes themselves.
A card.
The card attributes a surcharge is priced from.
typeenumrequiredSrchqCardAttributesAttributescurrencyIsoCurrencyrequiredThe currency the card is denominated in.
AFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
countryIsoCountryrequiredThe country the card was issued in.
AFAXALDZASADAOAIAQAG+239 moreShow fewer
AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, KP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, CD, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
brandCardBrandrequiredVisaMasterCardAmericanExpressDinersClubDiscoverUnionPayMaestroEloMirHiper+5 moreShow fewer
Hipercard, Jcb, Electron, Uatp, Unknown
fundingCardFundingrequiredCreditDebitChargeCardPrepaidDeferredDebitUnknownprepaidbooleanrequiredWhether the card is on an anonymous prepaid programme. Not the same as funding: Prepaid, and it is priced differently.
Example true
issuerstringrequiredThe issuing bank, as the scheme names it.
binstringFirst six to eight digits, where you have them.
Example 424242
productTypeCardProductTypeConsumerCorporateUnknownschemeProductCardSchemeProductMasterCardCrPerMasterCardSigniaMasterCardDrPerIntMasterCardWorldAllStarAmericanExpressVisaCreditPersonalVisaDrPerIntDinersClubDiscoverDinersCreditComEEA+43 moreShow fewer
DinersInternational, DinersCreditPerEEA, DinersDebitComEEA, DinersDebitPerEEA, VisaDebitPersonal, VisaDebitCom, DrMasterCardPer, DrMasterCardCom, DebitMasterCardPerInt, EFTPOSPriority1, EFTPOSPriority2, JCB, JCBCreditComEEA, JCBInternational, JCBCreditPerEEA, JCBDebitComEEA, JCBDebitPerEEA, Keyfuels, LaSer, Overdrive, VisaElectronDr, VisaElectronCr, VisaElecPerInt, MaestroPer, MaestroCom, MaestroPer2, MaestroIntlCom, MaestroIntlPer, Supercharge, Sears, MasterCardComm, MasterCardBusiness, MasterCardFleet, MasterCardCorporate, MasterCardPurchase, MasterCardDrCom, VisaBusiness, VisaCommerce, VisaCorporate, VisaPurchasing, VisaDrComIntl, UATP, Unknown
Direct debit from a bank account.
Direct debit from a bank account.
Google Pay, priced from the card behind it.
The card attributes a surcharge is priced from.
typeenumrequiredSrchqCardAttributesAttributescurrencyIsoCurrencyrequiredThe currency the card is denominated in.
AFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
countryIsoCountryrequiredThe country the card was issued in.
AFAXALDZASADAOAIAQAG+239 moreShow fewer
AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, KP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, CD, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
brandCardBrandrequiredVisaMasterCardAmericanExpressDinersClubDiscoverUnionPayMaestroEloMirHiper+5 moreShow fewer
Hipercard, Jcb, Electron, Uatp, Unknown
fundingCardFundingrequiredCreditDebitChargeCardPrepaidDeferredDebitUnknownprepaidbooleanrequiredWhether the card is on an anonymous prepaid programme. Not the same as funding: Prepaid, and it is priced differently.
Example true
issuerstringrequiredThe issuing bank, as the scheme names it.
binstringFirst six to eight digits, where you have them.
Example 424242
productTypeCardProductTypeConsumerCorporateUnknownschemeProductCardSchemeProductMasterCardCrPerMasterCardSigniaMasterCardDrPerIntMasterCardWorldAllStarAmericanExpressVisaCreditPersonalVisaDrPerIntDinersClubDiscoverDinersCreditComEEA+43 moreShow fewer
DinersInternational, DinersCreditPerEEA, DinersDebitComEEA, DinersDebitPerEEA, VisaDebitPersonal, VisaDebitCom, DrMasterCardPer, DrMasterCardCom, DebitMasterCardPerInt, EFTPOSPriority1, EFTPOSPriority2, JCB, JCBCreditComEEA, JCBInternational, JCBCreditPerEEA, JCBDebitComEEA, JCBDebitPerEEA, Keyfuels, LaSer, Overdrive, VisaElectronDr, VisaElectronCr, VisaElecPerInt, MaestroPer, MaestroCom, MaestroPer2, MaestroIntlCom, MaestroIntlPer, Supercharge, Sears, MasterCardComm, MasterCardBusiness, MasterCardFleet, MasterCardCorporate, MasterCardPurchase, MasterCardDrCom, VisaBusiness, VisaCommerce, VisaCorporate, VisaPurchasing, VisaDrComIntl, UATP, Unknown
A PayTo agreement.
A PayTo agreement.
A stored payment source, priced from whatever it holds.
sourceIdPsrcIdrequiredIdentifier of a payment source.
Example psrc_9f2Kd8QpLzXw
underlyingSrchqMethodrequiredThe same shape as surcharge.PtknSurchargeQuoted.quote.method, shown above.
Apply this surcharge. Only open to calls authenticated with a secret key, a browser cannot name its own surcharge.
amountMinorUnitsrequiredThe surcharge to apply, in the payment's own currency. Unbounded, a negative value is a discount to the payer, which the platform allows deliberately.
Example 1250
curl -X POST https://api.tst.au.apgpay.dev/payment-tokens \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "PtknCmdCreateFromApplePay",
"amount": {
"type": "IsoCurrencyAmount",
"minorCurrencyUnits": 1250,
"currency": "AUD"
},
"applePayPayload": "string",
"applePayMethod": "string",
"surcharge": {
"type": "PtknSurchargeNone"
}
}'Responses
The response is a tagged shape: type is always "PtknCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.
typetype = "PtknCreateRspAttributes"The resource that was created.
typeenumrequiredPtknViewAttributespaymentTokenIdPtknIdrequiredIdentifier of a payment token.
Example ptkn_9f2Kd8QpLzXw
sourceIdPsrcIdThe stored source this token was made from. Absent for a bank transfer and for a network token, which have no stored source.
Example psrc_9f2Kd8QpLzXw
What a payment token charges. Both are in the single currency given here.
typeenumrequiredPtknAmountsAttributescurrencyIsoCurrencyrequiredAFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
amountMinorUnitsrequiredThe total the payer will be charged.
Example 1250
surchargeMinorUnitsrequiredSurcharge included in amount. Zero where the merchant does not surcharge this method.
Example 1250
Whether this token pays in full or funds a plan, and which plan.
typePays the whole amount at once.
Pays the whole amount at once.
Funds a payment plan. The variant is the schedule.
variantSrchqPayPlanVariantrequiredFourFortnightlyQuartersFourWeeklyEightWeeklyTwentySixFortnightlyFiftyTwoWeeklyTwoMonthlyThreeMonthlyFourMonthlyFiveMonthlySixMonthly+11 moreShow fewer
SevenMonthly, EightMonthly, NineMonthly, TenMonthly, ElevenMonthly, TwelveMonthly, FortnightDeferred, FourWeekDeferred, SevenWeekDeferred, ThirtyDayDeferred, Unknown
What this token pays with. Decision 2: the method lives here and nowhere else, so everything downstream can refer to the token.
typeA bank transfer the payer makes themselves, quoting this reference.
referencestringrequiredThe reference the payer must quote, which is how the transfer is matched to this payment.
Example your-own-reference
A card, entered now or stored.
binstringrequiredFirst six to eight digits, identifying the issuer.
Example 424242
last4stringrequiredLast four digits of the card number.
Example 4242
expiryMonthinteger (int32)requiredExample 6
expiryYearinteger (int32)requiredExample 2029
brandCardBrandrequiredVisaMasterCardAmericanExpressDinersClubDiscoverUnionPayMaestroEloMirHiper+5 moreShow fewer
Hipercard, Jcb, Electron, Uatp, Unknown
countryIsoCountryrequiredThe country the card was issued in.
AFAXALDZASADAOAIAQAG+239 moreShow fewer
AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, KP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, CD, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
fundingCardFundingrequiredCreditDebitChargeCardPrepaidDeferredDebitUnknownA bank account, paid by direct debit.
The account, identified the way its country identifies one.
typeAn Australian account in Australian dollars (AUD): BSB plus account number.
bsbstringrequiredBank-state-branch, six digits.
accountNumberstringrequiredA Hong Kong account in Hong Kong dollars (HKD).
accountNumberstringrequiredA Hong Kong account in US dollars (USD). The platform holds these separately because they clear differently.
accountNumberstringrequiredA New Zealand account in New Zealand dollars (NZD): the full sixteen-digit number.
accountNumberstringrequiredA Singapore account in Singapore dollars (SGD).
accountNumberstringrequiredA network token, a scheme-provisioned credential, which is what a wallet payment becomes.
networkTypePtknNetworkTyperequiredWhose scheme provisioned the token.
VisaMasterCardUnknownbrandCardBrandrequiredVisaMasterCardAmericanExpressDinersClubDiscoverUnionPayMaestroEloMirHiper+5 moreShow fewer
Hipercard, Jcb, Electron, Uatp, Unknown
countryIsoCountryThe country the underlying card was issued in, where the scheme says.
AFAXALDZASADAOAIAQAG+239 moreShow fewer
AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, KP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, CD, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
fundingCardFundingCreditDebitChargeCardPrepaidDeferredDebitUnknownA PayTo agreement the payer has accepted.
accountHintstringrequiredEnough of the payer's account to show them which one it is.
agreementUidstringrequiredThe agreement authorising the debit.
{
"type": "PtknCreateRspAttributes",
"created": {
"type": "PtknViewAttributes",
"paymentTokenId": "ptkn_9f2Kd8QpLzXw",
"sourceId": "psrc_9f2Kd8QpLzXw",
"amounts": {
"type": "PtknAmountsAttributes",
"currency": "AUD",
"amount": 1250,
"surcharge": 1250
},
"paymentType": {
"type": "PtknTypePayInFull"
},
"method": {
"type": "PtknMethodBankTransfer",
"reference": "your-own-reference"
}
}
}Error responses
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}