Pinch Payments API

Payments product surface — create/update scheduled payments, take realtime card payments, retrieve and list payments, check payment nonces, and delete payments; 7 paths / 8 operations.

OpenAPI Specification

pinch-payments-payments.yml Raw ↑
openapi: 3.1.0
info:
  title: pinch-api-payments
  version: '2020.1'
servers:
- url: https://api.getpinch.com.au/test
security:
- sec0: []
paths:
  /payments/nonce:
    post:
      summary: Check Payment Nonce
      description: ''
      operationId: check-payment-nonce
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - nonce
              properties:
                nonce:
                  type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Nonce Exists:
                  value: "{\n    \"isNonceReplay\": true,\n    \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\
                    ,\n    \"data\": {\n        \"id\": \"pmt_XXXXXXXXXXXXXX\",\n        \"attemptId\"\
                    : \"att_XXXXXXXXX\",\n        \"amount\": 1000,\n        \"currency\": \"AUD\",\n\
                    \        \"description\": \"Quis molestias labore incidunt voluptate repellat magni\
                    \ recusandae et.\",\n        \"applicationFee\": 0,\n        \"totalFee\": 55,\n \
                    \       \"isSurcharged\": false,\n        \"sourceType\": \"credit-card\",\n     \
                    \   \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n        \"status\": \"\
                    approved\",\n        \"estimatedTransferDate\": \"2021-05-18\",\n        \"actualTransferDate\"\
                    : null,\n        \"payer\": {\n            \"id\": \"pyr_XXXXXXXXXXXXXX\",\n     \
                    \       \"firstName\": \"Alex\",\n            \"lastName\": \"Fadel\",\n         \
                    \   \"emailAddress\": \"Willis_Wyman@example.com\",\n            \"mobileNumber\"\
                    : null,\n            \"streetAddress\": null,\n            \"suburb\": null,\n   \
                    \         \"postcode\": null,\n            \"state\": null,\n            \"country\"\
                    : null,\n            \"companyName\": null,\n            \"companyRegistrationNumber\"\
                    : null,\n            \"metadata\": null\n        },\n        \"subscription\": null,\n\
                    \        \"attempts\": [\n            {\n                \"id\": \"att_XXXXXXXX\"\
                    ,\n                \"amount\": 1000,\n                \"currency\": \"AUD\",\n   \
                    \             \"convertedAmount\": null,\n                \"conversionRate\": null,\n\
                    \                \"convertedCurrency\": null,\n                \"estimatedSettlementDate\"\
                    : \"2021-05-18T00:00:00\",\n                \"isSurcharged\": false,\n           \
                    \     \"transactionDate\": \"2021-05-14T00:49:55.7510577Z\",\n                \"estimatedTransferDate\"\
                    : \"2021-05-18\",\n                \"actualTransferDate\": null,\n               \
                    \ \"source\": null,\n                \"dishonour\": null,\n                \"settlement\"\
                    : null,\n                \"fees\": {\n                    \"transactionFee\": 55,\n\
                    \                    \"applicationFee\": 0,\n                    \"totalFee\": 55,\n\
                    \                    \"currency\": \"AUD\",\n                    \"taxRate\": 0.1,\n\
                    \                    \"convertedTransactionFee\": null,\n                    \"convertedApplicationFee\"\
                    : null,\n                    \"convertedTotalFee\": null,\n                    \"\
                    convertedCurrency\": null,\n                    \"conversionRate\": null\n       \
                    \         },\n                \"status\": \"approved\"\n            }\n        ],\n\
                    \        \"refunds\": [],\n        \"metadata\": null,\n        \"nonce\": \"fdb06000-9d3f-4738-ab45-d8d9c7984e93\"\
                    \n    }\n}"
                Nonce Doesn't Exist:
                  value: "{\n    \"isNonceReplay\": false,\n    \"nonce\": \"test456\",\n    \"data\"\
                    : null\n}"
              schema:
                oneOf:
                - title: Nonce Exists
                  type: object
                  properties:
                    isNonceReplay:
                      type: boolean
                      example: true
                    nonce:
                      type: string
                      example: fdb06000-9d3f-4738-ab45-d8d9c7984e93
                    data:
                      type: object
                      properties:
                        id:
                          type: string
                          example: pmt_XXXXXXXXXXXXXX
                        attemptId:
                          type: string
                          example: att_XXXXXXXXX
                        amount:
                          type: integer
                          example: 1000
                        currency:
                          type: string
                          example: AUD
                        description:
                          type: string
                          example: Quis molestias labore incidunt voluptate repellat magni recusandae
                            et.
                        applicationFee:
                          type: integer
                          example: 0
                        totalFee:
                          type: integer
                          example: 55
                        isSurcharged:
                          type: boolean
                          example: false
                        sourceType:
                          type: string
                          example: credit-card
                        transactionDate:
                          type: string
                          example: '2021-05-14T00:49:55.7510577Z'
                        status:
                          type: string
                          example: approved
                        estimatedTransferDate:
                          type: string
                          example: '2021-05-18'
                        actualTransferDate: {}
                        payer:
                          type: object
                          properties:
                            id:
                              type: string
                              example: pyr_XXXXXXXXXXXXXX
                            firstName:
                              type: string
                              example: Alex
                            lastName:
                              type: string
                              example: Fadel
                            emailAddress:
                              type: string
                              example: Willis_Wyman@example.com
                            mobileNumber: {}
                            streetAddress: {}
                            suburb: {}
                            postcode: {}
                            state: {}
                            country: {}
                            companyName: {}
                            companyRegistrationNumber: {}
                            metadata: {}
                        subscription: {}
                        attempts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                example: att_XXXXXXXX
                              amount:
                                type: integer
                                example: 1000
                              currency:
                                type: string
                                example: AUD
                              convertedAmount: {}
                              conversionRate: {}
                              convertedCurrency: {}
                              estimatedSettlementDate:
                                type: string
                                example: '2021-05-18T00:00:00'
                              isSurcharged:
                                type: boolean
                                example: false
                              transactionDate:
                                type: string
                                example: '2021-05-14T00:49:55.7510577Z'
                              estimatedTransferDate:
                                type: string
                                example: '2021-05-18'
                              actualTransferDate: {}
                              source: {}
                              dishonour: {}
                              settlement: {}
                              fees:
                                type: object
                                properties:
                                  transactionFee:
                                    type: integer
                                    example: 55
                                  applicationFee:
                                    type: integer
                                    example: 0
                                  totalFee:
                                    type: integer
                                    example: 55
                                  currency:
                                    type: string
                                    example: AUD
                                  taxRate:
                                    type: number
                                    example: 0.1
                                  convertedTransactionFee: {}
                                  convertedApplicationFee: {}
                                  convertedTotalFee: {}
                                  convertedCurrency: {}
                                  conversionRate: {}
                              status:
                                type: string
                                example: approved
                        refunds:
                          type: array
                        metadata: {}
                        nonce:
                          type: string
                          example: fdb06000-9d3f-4738-ab45-d8d9c7984e93
                - title: Nonce Doesn't Exist
                  type: object
                  properties:
                    isNonceReplay:
                      type: boolean
                      example: false
                    nonce:
                      type: string
                      example: test456
                    data: {}
      deprecated: false
  /payments/{id}:
    delete:
      summary: Delete payment
      description: ''
      operationId: delete-payment
      parameters:
      - name: id
        in: path
        description: Payment Id in pmt_XXXXXXXXXXXXXX format
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: You will receive a 200 OK with no body
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"errorMessages\": [\n        {\n            \"propertyName\": \"paymentId\"\
                    ,\n            \"errorMessage\": \"Payment with id: pmt_XXXXXXXXXXXXXX not found\"\
                    ,\n            \"attemptedValue\": null,\n            \"customState\": null,\n   \
                    \         \"severity\": 0,\n            \"errorCode\": null,\n            \"formattedMessageArguments\"\
                    : null,\n            \"formattedMessagePlaceholderValues\": null,\n            \"\
                    resourceName\": null\n        }\n    ],\n    \"successful\": false\n}"
              schema:
                type: object
                properties:
                  errorMessages:
                    type: array
                    items:
                      type: object
                      properties:
                        propertyName:
                          type: string
                          example: paymentId
                        errorMessage:
                          type: string
                          example: 'Payment with id: pmt_XXXXXXXXXXXXXX not found'
                        attemptedValue: {}
                        customState: {}
                        severity:
                          type: integer
                          example: 0
                        errorCode: {}
                        formattedMessageArguments: {}
                        formattedMessagePlaceholderValues: {}
                        resourceName: {}
                  successful:
                    type: boolean
                    example: false
      deprecated: false
      x-readme:
        code-samples:
        - language: csharp
          code: 'await api.Payment.Delete(id);

            '
        samples-languages:
        - csharp
    get:
      summary: Get Payment
      description: ''
      operationId: get-payment
      parameters:
      - name: id
        in: path
        description: Payment Id in pmt_XXXXXXXXXXXXXX format
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"id\": \"pmt_XXXXXXXXXXXXXX\",\n    \"attemptId\": \"att_XXXXXXXX\"\
                    ,\n    \"amount\": 1000,\n    \"currency\": \"AUD\",\n    \"description\": \"asdfasdf\"\
                    ,\n    \"applicationFee\": 0,\n    \"totalFee\": 40,\n    \"isSurcharged\": false,\n\
                    \    \"sourceType\": \"bank-account\",\n    \"transactionDate\": \"2021-04-25T14:00:00.0000000Z\"\
                    ,\n    \"status\": \"scheduled\",\n    \"estimatedTransferDate\": \"2021-04-30\",\n\
                    \    \"actualTransferDate\": null,\n    \"payer\": {\n        \"id\": \"pyr_XXXXXXXXXXXXXX\"\
                    ,\n        \"firstName\": \"Test\",\n        \"lastName\": \"WebSample3\",\n     \
                    \   \"emailAddress\": \"testwebsample@mailinator.com\",\n        \"mobileNumber\"\
                    : \"0400000000\",\n        \"streetAddress\": \"123 Fake st\",\n        \"suburb\"\
                    : \"Teneriffe\",\n        \"postcode\": \"4005\",\n        \"state\": \"QLD\",\n \
                    \       \"country\": \"Australia\",\n        \"companyName\": \"Test Company\",\n\
                    \        \"companyRegistrationNumber\": \"112233\",\n        \"metadata\": null\n\
                    \    },\n    \"subscription\": null,\n    \"attempts\": [\n        {\n           \
                    \ \"id\": \"att_XXXXXXXX\",\n            \"amount\": 1000,\n            \"currency\"\
                    : \"AUD\",\n            \"convertedAmount\": null,\n            \"conversionRate\"\
                    : null,\n            \"convertedCurrency\": null,\n            \"estimatedSettlementDate\"\
                    : \"2021-04-30T00:00:00\",\n            \"isSurcharged\": false,\n            \"transactionDate\"\
                    : \"2021-04-25T14:00:00.0000000Z\",\n            \"estimatedTransferDate\": \"2021-04-30\"\
                    ,\n            \"actualTransferDate\": null,\n            \"source\": {\n        \
                    \        \"id\": \"src_vn4HGQxUhn2v3T\",\n                \"sourceType\": \"bank-account\"\
                    ,\n                \"bankAccountNumber\": \"000000000\",\n                \"bankAccountBsb\"\
                    : \"000000\",\n                \"bankAccountName\": \"Example Name\",\n          \
                    \      \"creditCardToken\": null,\n                \"cardHolderName\": null,\n   \
                    \             \"expiryDate\": null,\n                \"displayCardNumber\": null,\n\
                    \                \"cardScheme\": null,\n                \"origin\": \"AU\",\n    \
                    \            \"funding\": null\n            },\n            \"dishonour\": null,\n\
                    \            \"settlement\": null,\n            \"fees\": {\n                \"transactionFee\"\
                    : 40,\n                \"applicationFee\": 0,\n                \"totalFee\": 40,\n\
                    \                \"currency\": \"AUD\",\n                \"taxRate\": 0.1,\n     \
                    \           \"convertedTransactionFee\": null,\n                \"convertedApplicationFee\"\
                    : null,\n                \"convertedTotalFee\": null,\n                \"convertedCurrency\"\
                    : null,\n                \"conversionRate\": null\n            },\n            \"\
                    status\": \"scheduled\"\n        }\n    ],\n    \"metadata\": null\n}"
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: pmt_XXXXXXXXXXXXXX
                  attemptId:
                    type: string
                    example: att_XXXXXXXX
                  amount:
                    type: integer
                    example: 1000
                  currency:
                    type: string
                    example: AUD
                  description:
                    type: string
                    example: asdfasdf
                  applicationFee:
                    type: integer
                    example: 0
                  totalFee:
                    type: integer
                    example: 40
                  isSurcharged:
                    type: boolean
                    example: false
                  sourceType:
                    type: string
                    example: bank-account
                  transactionDate:
                    type: string
                    example: '2021-04-25T14:00:00.0000000Z'
                  status:
                    type: string
                    example: scheduled
                  estimatedTransferDate:
                    type: string
                    example: '2021-04-30'
                  actualTransferDate: {}
                  payer:
                    type: object
                    properties:
                      id:
                        type: string
                        example: pyr_XXXXXXXXXXXXXX
                      firstName:
                        type: string
                        example: Test
                      lastName:
                        type: string
                        example: WebSample3
                      emailAddress:
                        type: string
                        example: testwebsample@mailinator.com
                      mobileNumber:
                        type: string
                        example: '0400000000'
                      streetAddress:
                        type: string
                        example: 123 Fake st
                      suburb:
                        type: string
                        example: Teneriffe
                      postcode:
                        type: string
                        example: '4005'
                      state:
                        type: string
                        example: QLD
                      country:
                        type: string
                        example: Australia
                      companyName:
                        type: string
                        example: Test Company
                      companyRegistrationNumber:
                        type: string
                        example: '112233'
                      metadata: {}
                  subscription: {}
                  attempts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: att_XXXXXXXX
                        amount:
                          type: integer
                          example: 1000
                        currency:
                          type: string
                          example: AUD
                        convertedAmount: {}
                        conversionRate: {}
                        convertedCurrency: {}
                        estimatedSettlementDate:
                          type: string
                          example: '2021-04-30T00:00:00'
                        isSurcharged:
                          type: boolean
                          example: false
                        transactionDate:
                          type: string
                          example: '2021-04-25T14:00:00.0000000Z'
                        estimatedTransferDate:
                          type: string
                          example: '2021-04-30'
                        actualTransferDate: {}
                        source:
                          type: object
                          properties:
                            id:
                              type: string
                              example: src_vn4HGQxUhn2v3T
                            sourceType:
                              type: string
                              example: bank-account
                            bankAccountNumber:
                              type: string
                              example: '000000000'
                            bankAccountBsb:
                              type: string
                              example: '000000'
                            bankAccountName:
                              type: string
                              example: Example Name
                            creditCardToken: {}
                            cardHolderName: {}
                            expiryDate: {}
                            displayCardNumber: {}
                            cardScheme: {}
                            origin:
                              type: string
                              example: AU
                            funding: {}
                        dishonour: {}
                        settlement: {}
                        fees:
                          type: object
                          properties:
                            transactionFee:
                              type: integer
                              example: 40
                            applicationFee:
                              type: integer
                              example: 0
                            totalFee:
                              type: integer
                              example: 40
                            currency:
                              type: string
                              example: AUD
                            taxRate:
                              type: number
                              example: 0.1
                            convertedTransactionFee: {}
                            convertedApplicationFee: {}
                            convertedTotalFee: {}
                            convertedCurrency: {}
                            conversionRate: {}
                        status:
                          type: string
                          example: scheduled
                  metadata: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
        - language: csharp
          code: var payment = await api.Payment.Get(id);
        - language: curl
          code: "curl https://api.getpinch.com.au/test/payments/{id} \n -H \"Authorization: Bearer ...\""
        samples-languages:
        - csharp
        - curl
  /payments/payer/{id}:
    get:
      summary: List Payments for Payer
      description: ''
      operationId: list-payments-for-payer
      parameters:
      - name: id
        in: path
        description: Payment Id in pyr_XXXXXXXXXXXXXX format
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "[\n    {\n        \"id\": \"pmt_XXXXXXXXXXXXXX\",\n        \"attemptId\": \"\
                    att_XXXXXXXX\",\n        \"amount\": 1245,\n        \"currency\": \"AUD\",\n     \
                    \   \"description\": \"A lovely bunch of coconuts.\",\n        \"applicationFee\"\
                    : 0,\n        \"totalFee\": 42,\n        \"isSurcharged\": false,\n        \"sourceType\"\
                    : \"bank-account\",\n        \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\"\
                    ,\n        \"status\": \"scheduled\",\n        \"estimatedTransferDate\": \"2021-05-11\"\
                    ,\n        \"actualTransferDate\": null,\n        \"payer\": {\n            \"id\"\
                    : \"pyr_XXXXXXXXXXXXXX\",\n            \"firstName\": \"Test\",\n            \"lastName\"\
                    : \"Payer\",\n            \"emailAddress\": \"test.payer@mailinator.com\",\n     \
                    \       \"mobileNumber\": null,\n            \"streetAddress\": null,\n          \
                    \  \"suburb\": null,\n            \"postcode\": null,\n            \"state\": null,\n\
                    \            \"country\": null,\n            \"companyName\": null,\n            \"\
                    companyRegistrationNumber\": null,\n            \"metadata\": null\n        },\n \
                    \       \"subscription\": null,\n        \"attempts\": [\n            {\n        \
                    \        \"id\": \"att_XXXXXXXX\",\n                \"amount\": 1245,\n          \
                    \      \"currency\": \"AUD\",\n                \"convertedAmount\": null,\n      \
                    \          \"conversionRate\": null,\n                \"convertedCurrency\": null,\n\
                    \                \"estimatedSettlementDate\": \"2021-05-11T00:00:00\",\n         \
                    \       \"isSurcharged\": false,\n                \"transactionDate\": \"2021-05-04T14:00:00.0000000Z\"\
                    ,\n                \"estimatedTransferDate\": \"2021-05-11\",\n                \"\
                    actualTransferDate\": null,\n                \"source\": {\n                    \"\
                    id\": \"src_XXXXXXXXXXXXXX\",\n                    \"sourceType\": \"bank-account\"\
                    ,\n                    \"bankAccountNumber\": \"000000000\",\n                   \
                    \ \"bankAccountBsb\": \"040000\",\n                    \"bankAccountName\": \"Test\
                    \ Account\",\n                    \"creditCardToken\": null,\n                   \
                    \ \"cardHolderName\": null,\n                    \"expiryDate\": null,\n         \
                    \           \"displayCardNumber\": null,\n                    \"cardScheme\": null,\n\
                    \                    \"origin\": \"AU\"\n                },\n                \"dishonour\"\
                    : null,\n                \"settlement\": null,\n                \"fees\": {\n    \
                    \                \"transactionFee\": 42,\n                    \"applicationFee\":\
                    \ 0,\n                    \"totalFee\": 42,\n                    \"currency\": \"\
                    AUD\",\n                    \"taxRate\": 0.1,\n                    \"convertedTransactionFee\"\
                    : null,\n                    \"convertedApplicationFee\": null,\n                \
                    \    \"convertedTotalFee\": null,\n                    \"convertedCurrency\": null,\n\
                    \                    \"conversionRate\": null\n                },\n              \
                    \  \"status\": \"scheduled\"\n            }\n        ],\n        \"metadata\": null\n\
                    \    },\n    {\n        \"id\": \"pmt_XXXXXXXXXXXXXX\",\n        \"attemptId\": \"\
                    att_XXXXXXXX\",\n        \"amount\": 1245,\n        \"currency\": \"AUD\",\n     \
                    \   \"description\": \"A sweet new hat\",\n        \"applicationFee\": 0,\n      \
                    \  \"totalFee\": 61,\n        \"isSurcharged\": false,\n        \"sourceType\": \"\
                    credit-card\",\n        \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\",\n \
                    \       \"status\": \"approved\",\n        \"estimatedTransferDate\": \"2021-04-21\"\
                    ,\n        \"actualTransferDate\": null,\n        \"payer\": {\n            \"id\"\
                    : \"pyr_XXXXXXXXXXXXXX\",\n            \"firstName\": \"Test\",\n            \"lastName\"\
                    : \"Payer\",\n            \"emailAddress\": \"test.payer@mailinator.com\",\n     \
                    \       \"mobileNumber\": null,\n            \"streetAddress\": null,\n          \
                    \  \"suburb\": null,\n            \"postcode\": null,\n            \"state\": null,\n\
                    \            \"country\": null,\n            \"companyName\": null,\n            \"\
                    companyRegistrationNumber\": null,\n            \"metadata\": null\n        },\n \
                    \       \"subscription\": null,\n        \"attempts\": [\n            {\n        \
                    \        \"id\": \"att_XXXXXXXX\",\n                \"amount\": 1245,\n          \
                    \      \"currency\": \"AUD\",\n                \"convertedAmount\": null,\n      \
                    \          \"conversionRate\": null,\n                \"convertedCurrency\": null,\n\
                    \                \"estimatedSettlementDate\": \"2021-04-21T00:00:00\",\n         \
                    \       \"isSurcharged\": false,\n                \"transactionDate\": \"2021-04-19T05:43:01.2642435Z\"\
                    ,\n                \"estimatedTransferDate\": \"2021-04-21\",\n                \"\
                    actualTransferDate\": null,\n                \"source\": {\n                    \"\
                    id\": \"src_XXXXXXXXXXXXXX\",\n                    \"sourceType\": \"credit-card\"\
                    ,\n                    \"bankAccountNumber\": null,\n                    \"bankAccountBsb\"\
                    : null,\n                    \"bankAccountName\": null,\n                    \"creditCardToken\"\
                    : \"tkn_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n                    \"cardHolderName\"\
                    : \"Ben Hotdog\",\n                    \"expiryDate\": \"2022-12-01T00:00:00\",\n\
                    \                    \"displayCardNumber\": \"4242\",\n                    \"cardScheme\"\
                    : \"visa\",\n                    \"origin\": \"AU\"\n                },\n        \
                    \        \"dishonour\": null,\n                \"settlement\": null,\n           \
                    \     \"fees\": {\n                    \"transactionFee\": 61,\n                 \
                    \   \"applicationFee\": 0,\n                    \"totalFee\": 61,\n              \
                    \      \"currency\": \"AUD\",\n                    \"taxRate\": 0.1,\n           \
                    \         \"convertedTransactionFee\": null,\n                    \"convertedApplicationFee\"\
                    : null,\n                    \"convertedTotalFee\": null,\n                    \"\
                    convertedCurrency\": null,\n                    \"conversionRate\": null\n       \
                    \         },\n                \"status\": \"approved\"\n            }\n        ],\n\
                    \        \"metadata\": null\n    }\n]"
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: pmt_XXXXXXXXXXXXXX
                    attemptId:
           

# --- truncated at 32 KB (104 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pinch-payments/refs/heads/main/openapi/pinch-payments-payments.yml