PayByLink

Gets a payment link by id

API to get a payment link by id. <br><strong>Access Token Required scope:</strong> payment-links/id/get

get/v1/payment-links/{payment_link_id}

Request

  • Base URL
    https://docs.teya.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Authorization codehttps://id.teya.xyz/oauth/v2/oauth-authorize
      Client credentials
      Token URLhttps://id.teya.xyz/oauth/v2/oauth-token
    • or OAuth 2
      Authorization codehttps://id.teya.com/oauth/v2/oauth-authorize
      Client credentials
      Token URLhttps://id.teya.com/oauth/v2/oauth-token
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

payment_link_idstring uuid required

A unique identifier for the created payment link

Example:20eb276c-5b6b-4474-a5a1-49bcd6193148

The payment link id

Headers

User-Agentstring required
Example:YourCompany-Integration/1.0

Identifies your integration, for example YourCompany-Integration/1.0. Requests without a User-Agent can be blocked by our firewall before they reach the API.

Response

a payment link has been returned

cancel_urlstring

URL to redirect to when the customer cancels the payment

customer_success_emailstring

Email address to send customer success notification to

expires_atstring date-time

Date when the link will be considered expired in ISO 8601 format

merchant_referencestring

An identifier that can be used to reference the transaction on the merchant's side. Overrides 'source_reference_id

merchant_success_emailstring

Email address to send merchant success notification to

metadataobject

Metadata key-value pairs associated with the payment link

payment_link_idstring uuid required

A unique identifier for the created payment link

post_success_payment'SHOW_SUCCESS_PAGE' | 'REDIRECT'

Action to take after a successful payment

required_customer_fieldsstring[]

Customer fields that must be collected during checkout

status'VALID' | 'COMPLETED' | 'MANUALLY_EXPIRED' | 'DISABLED' | 'EXPIRED' required

The status of the payment link

success_urlstring

URL to redirect to after a successful payment

supported_card_brandsstring[]

Card brands supported for this payment link

supported_payment_methodsstring[]

Payment methods supported for this payment link

Example response

{
  "amount": {
    "currency": "USD",
    "value": 100
  },
  "billing_address": {
    "city": "London",
    "country": "GB",
    "street_address_line1": "Main Street",
    "zipcode": "SW1A1AA"
  },
  "cancel_url": "https://example.com/cancel",
  "customer": {
    "email": "emailaddress@example.com",
    "name": "John Doe",
    "phone_number": "+447911123456"
  },
  "customer_success_email": "customer@example.com",
  "expires_at": "2024-07-03T13:37:58.709Z",
  "line_items": [
    {
      "description": "Product 1",
      "quantity": 1,
      "unit_price": 100
    }
  ],
  "merchant_reference": "merchant-reference-id",
  "merchant_success_email": "merchant@example.com",
  "metadata": {
    "order_id": "12345",
    "table_number": "5"
  },
  "payment_link_id": "20eb276c-5b6b-4474-a5a1-49bcd6193148",
  "post_success_payment": "REDIRECT",
  "required_customer_fields": [
    "EMAIL",
    "PHONE"
  ],
  "status": "COMPLETED",
  "success_url": "https://example.com/success",
  "supported_card_brands": [
    "VISA",
    "MASTERCARD"
  ],
  "supported_payment_methods": [
    "CARD"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.