Payments

Create Payment

Creates a payment after obtaining the user's authorisation.

Features:

  • CREATE_DOMESTIC_PERIODIC_PAYMENT
  • CREATE_DOMESTIC_SCHEDULED_PAYMENT
  • CREATE_DOMESTIC_SINGLE_INSTANT_PAYMENT
  • CREATE_DOMESTIC_SINGLE_PAYMENT
  • CREATE_INTERNATIONAL_PERIODIC_PAYMENT
  • CREATE_INTERNATIONAL_SCHEDULED_PAYMENT
  • CREATE_INTERNATIONAL_SINGLE_PAYMENT
post/payments

Request

  • Base URL
    https://api.yapily.com
  • Auth
    HTTP basic

Headers

consentstring required

Mandatory. The consent-token containing the user's authorisation to make the request.

psu-idstring

Conditional. Represents the user's login ID for the Institution to a personal account.

See PSU identifiers to see if this header is required.

psu-corporate-idstring

Conditional. Represents the user's login ID for the Institution to a business account.

See PSU identifiers to see if this header is required.

psu-ip-addressstring

Conditional. The IP address of the PSU.

See PSU identifiers to see if this header is required.

sub-applicationstring uuid

The sub-application ID to which event type is being subscribed to

Request body

paymentIdempotencyIdstring required

Mandatory. A unique identifier that you must provide to identify the payment. This can be any alpha-numeric string but is limited to a maximum of 35 characters.

referencestring

Optional. The payment reference or description. Limited to a maximum of 18 characters long.

contextType'BILL' | 'GOODS' | 'SERVICES' | 'OTHER' | 'PERSON_TO_PERSON' | 'BILL_IN_ADVANCE' | 'BILL_IN_ARREARS' | 'ECOMMERCE_MERCHANT' | 'FACE_TO_FACE_POS' | 'TRANSFER_TO_SELF' | 'TRANSFER_TO_THIRD_PARTY' | 'PISP_PAYEE'

Optional. The payment context code. This defaults to OTHER if not specified.

purposeCodestring

Optional. The payment purpose code.

Allowed values: INTP, DEPT, BEXP, LICF, SERV, SUPP, TRAD, SUBS, GDSV, ROYA, COMT, CHAR, ECPR, CLPR, INTE, LOAN, LOAR, INPC, INPR, INSC, INSU, LIFI, PPTI, HLRP, HLST, PDEP, IVPT, REBT, REFU, CDBL, CPKC, EDUC, FEES, GAMB, LOTT, GIFT, INSM, REOD, GOVT, TCSC, BLDM, RENT, DIVD, INVS, SAVG, HLTI, DNTS, LTCF, MDCS, VIEW, BECH, BENE, SSBE, PEFC, PENS, ADCS, BONU, COMM, SALA, ESTX, HSTX, INTX, PTXP, RDTX, TAXS, VATX, WHLD, TAXR, CBTV, ELEC, GASB, PHON, UBIL, WTER .

See Payment Purpose code to see the definition of each code

type'DOMESTIC_PAYMENT' | 'DOMESTIC_INSTANT_PAYMENT' | 'DOMESTIC_VARIABLE_RECURRING_PAYMENT' | 'DOMESTIC_SCHEDULED_PAYMENT' | 'DOMESTIC_PERIODIC_PAYMENT' | 'INTERNATIONAL_PAYMENT' | 'INTERNATIONAL_SCHEDULED_PAYMENT' | 'INTERNATIONAL_PERIODIC_PAYMENT' | 'BULK_PAYMENT' required

Mandatory. Used to specify which of the payment types to execute.

See European Payments to verify whether the type should be DOMESTIC or INTERNATIONAL.

paymentDateTimestring date-time

Conditional. Used to specify the date of the payment when the payment type is one of the following:

  • DOMESTIC_SCHEDULED_PAYMENT
  • DOMESTIC_PERIODIC_PAYMENT
  • INTERNATIONAL_SCHEDULED_PAYMENT
  • INTERNATIONAL_PERIODIC_PAYMENT
readRefundAccountboolean

Optional. Used to request the payer details in the payment response when the Institution provides the feature READ_DOMESTIC_SINGLE_REFUND.

See Reverse Payments for more information.

Example request

{
  "paymentIdempotencyId": "04ab4536gaerfc0e1f93c4f4",
  "payer": {
    "name": "John Doe",
    "accountIdentifications": [
      {
        "type": "SORT_CODE",
        "identification": "401016"
      }
    ],
    "address": {
      "country": "GB"
    }
  },
  "reference": "Bill payment",
  "payee": {
    "name": "Jane Doe",
    "accountIdentifications": [
      {
        "identification": "401016",
        "type": "SORT_CODE"
      },
      {
        "identification": "71518920",
        "type": "ACCOUNT_NUMBER"
      }
    ],
    "address": {
      "country": "GB"
    },
    "merchantId": "24589303",
    "merchantCategoryCode": "0742"
  },
  "periodicPayment": {
    "frequency": {
      "intervalWeek": 1,
      "intervalMonth": 1,
      "executionDay": 1
    },
    "numberOfPayments": 5,
    "nextPaymentDateTime": "2018-01-10T00:00:00Z",
    "nextPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    },
    "finalPaymentDateTime": "2030-01-10T00:00:00Z",
    "finalPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    }
  },
  "amount": {
    "amount": 10,
    "currency": "GBP"
  },
  "paymentDateTime": "2021-07-21T17:32:28Z"
}

Response

Created

linksobject
tracingIdstring

Example response

{
  "data": {
    "statusDetails": {
      "isoStatus": {
        "code": "ACCC",
        "name": "AcceptedCreditSettlementCompleted"
      }
    },
    "payer": {
      "name": "John Doe",
      "accountIdentifications": [
        {
          "type": "SORT_CODE",
          "identification": "401016"
        }
      ],
      "address": {
        "country": "GB"
      }
    },
    "payeeDetails": {
      "name": "Jane Doe",
      "accountIdentifications": [
        {
          "identification": "401016",
          "type": "SORT_CODE"
        },
        {
          "identification": "71518920",
          "type": "ACCOUNT_NUMBER"
        }
      ],
      "address": {
        "country": "GB"
      },
      "merchantId": "24589303",
      "merchantCategoryCode": "0742"
    },
    "amountDetails": {
      "amount": 10,
      "currency": "GBP"
    },
    "firstPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    },
    "nextPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    },
    "finalPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    },
    "previousPaymentAmount": {
      "amount": 10,
      "currency": "GBP"
    },
    "chargeDetails": [
      {
        "chargeAmount": {
          "amount": 10,
          "currency": "GBP"
        }
      }
    ],
    "refundAccount": {
      "accountIdentifications": [
        {
          "type": "SORT_CODE",
          "identification": "401016"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 4 revisions of this API.