v1

latestOpenAPI 3.1.02026-07-2469193340.0 KB
Payments

create payment

post/payto/payments

Request body

uidstring required

Supplied unique identifier for payment, maximum 64 characters containing only unreserved characters as defined in RFC3986. This identifier ensures payment uniqueness between integrator systems and Zepto.

agreement_uidstring required

A supplied unique ID

amountinteger required

Amount in cents.

priority'unattended' | 'attended' required

Execution priority of payment. attended payments will be prioritised over unattended payments.

referencestring nullable

Free-form text for reconciliation purposes. Typically this field will be shown to both parties on bank statements, however, the debtor can also control this via the agreement. The reference given here takes precedence over the agreeement's reference when it has been set by the debtor.

descriptionstring nullable

Free-form text for the matching/reconciliation of a transaction. Similar to the reference field, this can be shown on both parties' bank statements. The difference is that this description can be a longer string and banks can show this seperately from the reference.

creditor_referencestring nullable

A reference to aid the creditor in reconciling the payment

last_paymentboolean nullable

This is a required field with agreements that have a payment_terms.type of balloon. If true, it indicates that this payment is the last payment for the agreement, and should be validated against the last_payment_date and last_payment_amount. No further payments can be made with the agreement once the last payment has been made. This field should be set to false for all other payments against a balloon agreement, and must be unset for payments on non-balloon agreements.

metadataPaytoMetadata nullable

Use for your custom data. A place to store any miscellaneous information your system may need in regards to the record you are creating. This will be included in associated webhook payloads under the resource_metadata key. Nested values (i.e., objects and arrays) are not allowed. The maximum size of this parameter is 2kb.

Example request

{
  "uid": "biz_20221231_G7MQWwkQZIP8vbfH",
  "agreement_uid": "Agreement_00012345",
  "amount": 2495,
  "reference": "INVOICE #1003",
  "description": "Payment 1 of 6 for Zeptinghouse Smart Fridge 300L",
  "creditor": {
    "party_name": "Jane Smith",
    "ultimate_party_name": "Jane Smith",
    "account_identifier": {
      "value": "123456-98765432"
    }
  },
  "creditor_reference": "PYMNT-1003",
  "debtor": {
    "party_name": "Bob Jean",
    "ultimate_party_name": "Bob Jane"
  },
  "metadata": {
    "custom_key": "custom_value"
  }
}

Response

successful

Example response

{
  "data": {
    "uid": "biz_20221231_G7MQWwkQZIP8vbfH",
    "agreement_uid": "Agreement_00012345",
    "source_payto_refund_uid": "Refund_00012345",
    "reference": "INVOICE #1003",
    "description": "Payment 1 of 6 for Zeptinghouse Smart Fridge 300L",
    "creditor": {
      "party_name": "Jane Smith",
      "ultimate_party_name": "Jane Smith",
      "account_identifier": {
        "value": "123456-98765432"
      }
    },
    "creditor_reference": "PYMNT-1003",
    "debtor": {
      "ultimate_party_name": "Bob Jane",
      "party_name": "Bob Jean",
      "account_identifier": {
        "value": "123456-98765432"
      }
    },
    "amount": 2495,
    "metadata": {
      "custom_key": "custom_value"
    },
    "failure": {
      "title": "Agreement Status Invalid",
      "detail": "Contact Zepto for more information - The requested operation cannot be performed for the current status of the agreement",
      "code": "MMS.API.9104"
    },
    "links": {
      "self": "https://api.zeptopayments.com/payto/payments/biz_payment_G7MQWwkQZIP8vbfH",
      "agreement": "https://api.zeptopayments.com/payto/agreements/biz_agreement_G7MQWwkQZIP8vbfH",
      "source_refund": "https://api.zeptopayments.com/payto/refunds/biz_refund_G7MQWwkQZIP8vbfH"
    }
  }
}