Home

Paayed Payments API

v2026-09-01

Take card payments, store cards, run subscriptions and receive events.

Generated from the code by php artisan public-api:openapi; do not edit by hand.

Base URLs
https://gateway.sandbox.paayed.comSandbox. Test keys, test cards, no real money.
https://gateway.paayed.comProduction.

Authentication

secretKeyhttp

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Scheme: bearer

Payments

List payments

GET
https://gateway.sandbox.paayed.com/v1/payments

Requires scope: payments.read.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
statusstringpendingrequires_actionauthorizedsucceededdeclinedfailedcancelledexpiredrefundedpartially_refundedon_holddisputedquery
customerstringquery
referencestringquery
payment_methodstringquery
subscriptionstringquery
created[gte]string<date-time>query
created[lte]string<date-time>query

Response

200OKobject

A page of Payment objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List payments
curl -X GET 'https://gateway.sandbox.paayed.com/v1/payments'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/payments')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/payments", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payments')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/payments")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "payment",
      "status": "pending",
      "amount": 0,
      "amount_captured": 0,
      "amount_refunded": 0,
      "currency": "string",
      "reference": "string",
      "description": "string",
      "customer": "string",
      "payment_method": {
        "id": "string",
        "type": "card",
        "stored": true,
        "card": {
          "brand": "string",
          "last4": "string",
          "bin": "string",
          "expiry_month": 0,
          "expiry_year": 0,
          "funding": "string",
          "country": "string",
          "issuer": "string"
        }
      },
      "initiated_by": "customer",
      "sequence": "recurring",
      "subscription": "string",
      "three_d_secure": {
        "required": true,
        "status": "pending",
        "version": "string"
      },
      "next_action": {
        "type": "three_d_secure_challenge",
        "challenge": {
          "acs_url": "https://example.com",
          "creq": "string",
          "confirm_url": "https://example.com"
        }
      },
      "decline_code": "insufficient_funds",
      "fee": {
        "amount": 0,
        "currency": "string",
        "settled": true
      },
      "net": {
        "amount": 0,
        "currency": "string"
      },
      "order": {},
      "metadata": {},
      "captured_at": "2024-01-15T09:30:00Z",
      "created_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Create a payment

POST
https://gateway.sandbox.paayed.com/v1/payments

Two shapes: payment_method as a card object takes a cardholder-present payment; payment_method as a pmth_ identifier charges a stored card without the cardholder (initiated_by and sequence are then required). A declined payment is still created and returned with 201; read its status and decline_code.

Requires scope: payments.write. Idempotent: send an Idempotency-Key.

Body

application/json
One of
amountnumberrequired

Decimal major units, at most as many decimal places as the currency allows.

currencystringrequired

An ISO 4217 code the account can take payments in.

captureboolean
referencestringrequired
descriptionstring | null
customerobject
Show child attributes
idstring
emailstring<email> | null
namestring
processing_channelstring
orderobject
Show child attributes
itemsArray<object>
Show child attributes
namestringrequired
quantityintegerrequired
unit_amountnumberrequired

Decimal major units, at most as many decimal places as the currency allows.

tax_amountnumber

Decimal major units, at most as many decimal places as the currency allows.

skustring | null
metadataarray
payment_methodobjectrequired
Show child attributes
typestringcardrequired
cardobjectrequired
Show child attributes
numberstringrequired

13 to 19 digits passing the Luhn check; spaces and dashes are tolerated.

expiry_monthinteger[1, 12]required
expiry_yearinteger[0, 2099]required
cvcstringrequired
holder_namestringrequired
billing_addressobject
Show child attributes
line1string
line2string | null
citystring | null
postcodestring | null
countrystring | null
statestring | null
initiated_bystringcustomer
storeboolean
three_d_secureobject
Show child attributes
modestringautomaticrequirednever
return_urlstring<uri>
amountnumberrequired

Decimal major units, at most as many decimal places as the currency allows.

currencystringrequired

An ISO 4217 code the account can take payments in.

captureboolean
referencestringrequired
descriptionstring | null
customerobject
Show child attributes
idstring
emailstring<email> | null
processing_channelstring
orderobject
Show child attributes
itemsArray<object>
Show child attributes
namestringrequired
quantityintegerrequired
unit_amountnumberrequired

Decimal major units, at most as many decimal places as the currency allows.

tax_amountnumber

Decimal major units, at most as many decimal places as the currency allows.

skustring | null
metadataarray
payment_methodstringrequired
initiated_bystringmerchantrequired
sequencestringrecurringunscheduledrequired

Parameters

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

201Createdobject

The Payment object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Create a payment
curl -X POST 'https://gateway.sandbox.paayed.com/v1/payments' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 0,
    "currency": "string",
    "capture": true,
    "reference": "string",
    "description": "string",
    "customer": {
      "id": "string",
      "email": "user@example.com",
      "name": "string"
    },
    "processing_channel": "string",
    "order": {
      "items": [
        {
          "name": "string",
          "quantity": 1,
          "unit_amount": 0,
          "tax_amount": 0,
          "sku": "string"
        }
      ]
    },
    "metadata": [],
    "payment_method": {
      "type": "card",
      "card": {
        "number": "string",
        "expiry_month": 1,
        "expiry_year": 0,
        "cvc": "string",
        "holder_name": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    },
    "initiated_by": "customer",
    "store": true,
    "three_d_secure": {
      "mode": "automatic"
    },
    "return_url": "https://example.com"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "amount": 0,
      "currency": "string",
      "capture": true,
      "reference": "string",
      "description": "string",
      "customer": {
        "id": "string",
        "email": "user@example.com",
        "name": "string"
      },
      "processing_channel": "string",
      "order": {
        "items": [
          {
            "name": "string",
            "quantity": 1,
            "unit_amount": 0,
            "tax_amount": 0,
            "sku": "string"
          }
        ]
      },
      "metadata": [],
      "payment_method": {
        "type": "card",
        "card": {
          "number": "string",
          "expiry_month": 1,
          "expiry_year": 0,
          "cvc": "string",
          "holder_name": "string"
        },
        "billing_address": {
          "line1": "string",
          "line2": "string",
          "city": "string",
          "postcode": "string",
          "country": "string",
          "state": "string"
        }
      },
      "initiated_by": "customer",
      "store": true,
      "three_d_secure": {
        "mode": "automatic"
      },
      "return_url": "https://example.com"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "amount": 0,
      "currency": "string",
      "capture": true,
      "reference": "string",
      "description": "string",
      "customer": {
        "id": "string",
        "email": "user@example.com",
        "name": "string"
      },
      "processing_channel": "string",
      "order": {
        "items": [
          {
            "name": "string",
            "quantity": 1,
            "unit_amount": 0,
            "tax_amount": 0,
            "sku": "string"
          }
        ]
      },
      "metadata": [],
      "payment_method": {
        "type": "card",
        "card": {
          "number": "string",
          "expiry_month": 1,
          "expiry_year": 0,
          "cvc": "string",
          "holder_name": "string"
        },
        "billing_address": {
          "line1": "string",
          "line2": "string",
          "city": "string",
          "postcode": "string",
          "country": "string",
          "state": "string"
        }
      },
      "initiated_by": "customer",
      "store": true,
      "three_d_secure": {
        "mode": "automatic"
      },
      "return_url": "https://example.com"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "amount": 0,
  "currency": "string",
  "capture": True,
  "reference": "string",
  "description": "string",
  "customer": {
    "id": "string",
    "email": "user@example.com",
    "name": "string"
  },
  "processing_channel": "string",
  "order": {
    "items": [
      {
        "name": "string",
        "quantity": 1,
        "unit_amount": 0,
        "tax_amount": 0,
        "sku": "string"
      }
    ]
  },
  "metadata": [],
  "payment_method": {
    "type": "card",
    "card": {
      "number": "string",
      "expiry_month": 1,
      "expiry_year": 0,
      "cvc": "string",
      "holder_name": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  },
  "initiated_by": "customer",
  "store": True,
  "three_d_secure": {
    "mode": "automatic"
  },
  "return_url": "https://example.com"
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/payments', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "amount": 0,
    "currency": "string",
    "capture": true,
    "reference": "string",
    "description": "string",
    "customer": {
      "id": "string",
      "email": "user@example.com",
      "name": "string"
    },
    "processing_channel": "string",
    "order": {
      "items": [
        {
          "name": "string",
          "quantity": 1,
          "unit_amount": 0,
          "tax_amount": 0,
          "sku": "string"
        }
      ]
    },
    "metadata": [],
    "payment_method": {
      "type": "card",
      "card": {
        "number": "string",
        "expiry_month": 1,
        "expiry_year": 0,
        "cvc": "string",
        "holder_name": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    },
    "initiated_by": "customer",
    "store": true,
    "three_d_secure": {
      "mode": "automatic"
    },
    "return_url": "https://example.com"
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/payments", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payments')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "amount": 0,
    "currency": "string",
    "capture": true,
    "reference": "string",
    "description": "string",
    "customer": {
      "id": "string",
      "email": "user@example.com",
      "name": "string"
    },
    "processing_channel": "string",
    "order": {
      "items": [
        {
          "name": "string",
          "quantity": 1,
          "unit_amount": 0,
          "tax_amount": 0,
          "sku": "string"
        }
      ]
    },
    "metadata": [],
    "payment_method": {
      "type": "card",
      "card": {
        "number": "string",
        "expiry_month": 1,
        "expiry_year": 0,
        "cvc": "string",
        "holder_name": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    },
    "initiated_by": "customer",
    "store": true,
    "three_d_secure": {
      "mode": "automatic"
    },
    "return_url": "https://example.com"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "amount": 0,
      "currency": "string",
      "capture": true,
      "reference": "string",
      "description": "string",
      "customer": {
        "id": "string",
        "email": "user@example.com",
        "name": "string"
      },
      "processing_channel": "string",
      "order": {
        "items": [
          {
            "name": "string",
            "quantity": 1,
            "unit_amount": 0,
            "tax_amount": 0,
            "sku": "string"
          }
        ]
      },
      "metadata": [],
      "payment_method": {
        "type": "card",
        "card": {
          "number": "string",
          "expiry_month": 1,
          "expiry_year": 0,
          "cvc": "string",
          "holder_name": "string"
        },
        "billing_address": {
          "line1": "string",
          "line2": "string",
          "city": "string",
          "postcode": "string",
          "country": "string",
          "state": "string"
        }
      },
      "initiated_by": "customer",
      "store": true,
      "three_d_secure": {
        "mode": "automatic"
      },
      "return_url": "https://example.com"
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/payments")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "amount": 0,
  "currency": "string",
  "capture": true,
  "reference": "string",
  "description": "string",
  "customer": {
    "id": "string",
    "email": "user@example.com",
    "name": "string"
  },
  "processing_channel": "string",
  "order": {
    "items": [
      {
        "name": "string",
        "quantity": 1,
        "unit_amount": 0,
        "tax_amount": 0,
        "sku": "string"
      }
    ]
  },
  "metadata": [],
  "payment_method": {
    "type": "card",
    "card": {
      "number": "string",
      "expiry_month": 1,
      "expiry_year": 0,
      "cvc": "string",
      "holder_name": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  },
  "initiated_by": "customer",
  "store": true,
  "three_d_secure": {
    "mode": "automatic"
  },
  "return_url": "https://example.com"
}
{
  "id": "string",
  "object": "payment",
  "status": "pending",
  "amount": 0,
  "amount_captured": 0,
  "amount_refunded": 0,
  "currency": "string",
  "reference": "string",
  "description": "string",
  "customer": "string",
  "payment_method": {
    "id": "string",
    "type": "card",
    "stored": true,
    "card": {
      "brand": "string",
      "last4": "string",
      "bin": "string",
      "expiry_month": 0,
      "expiry_year": 0,
      "funding": "string",
      "country": "string",
      "issuer": "string"
    }
  },
  "initiated_by": "customer",
  "sequence": "recurring",
  "subscription": "string",
  "three_d_secure": {
    "required": true,
    "status": "pending",
    "version": "string"
  },
  "next_action": {
    "type": "three_d_secure_challenge",
    "challenge": {
      "acs_url": "https://example.com",
      "creq": "string",
      "confirm_url": "https://example.com"
    }
  },
  "decline_code": "insufficient_funds",
  "fee": {
    "amount": 0,
    "currency": "string",
    "settled": true
  },
  "net": {
    "amount": 0,
    "currency": "string"
  },
  "order": {},
  "metadata": {},
  "captured_at": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a payment

GET
https://gateway.sandbox.paayed.com/v1/payments/{id}

Requires scope: payments.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Payment object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a payment
curl -X GET 'https://gateway.sandbox.paayed.com/v1/payments/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/payments/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/payments/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payments/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/payments/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "payment",
  "status": "pending",
  "amount": 0,
  "amount_captured": 0,
  "amount_refunded": 0,
  "currency": "string",
  "reference": "string",
  "description": "string",
  "customer": "string",
  "payment_method": {
    "id": "string",
    "type": "card",
    "stored": true,
    "card": {
      "brand": "string",
      "last4": "string",
      "bin": "string",
      "expiry_month": 0,
      "expiry_year": 0,
      "funding": "string",
      "country": "string",
      "issuer": "string"
    }
  },
  "initiated_by": "customer",
  "sequence": "recurring",
  "subscription": "string",
  "three_d_secure": {
    "required": true,
    "status": "pending",
    "version": "string"
  },
  "next_action": {
    "type": "three_d_secure_challenge",
    "challenge": {
      "acs_url": "https://example.com",
      "creq": "string",
      "confirm_url": "https://example.com"
    }
  },
  "decline_code": "insufficient_funds",
  "fee": {
    "amount": 0,
    "currency": "string",
    "settled": true
  },
  "net": {
    "amount": 0,
    "currency": "string"
  },
  "order": {},
  "metadata": {},
  "captured_at": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Complete 3-D Secure

POST
https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm

Post the cres the access control server returned. The payment moves from requires_action to succeeded or declined.

Requires scope: payments.write. Idempotent: send an Idempotency-Key.

Body

application/json
cresstringrequired

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Payment object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Complete 3-D Secure
curl -X POST 'https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm' \
  -H 'Content-Type: application/json' \
  -d '{
    "cres": "string"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "cres": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "cres": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "cres": "string"
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "cres": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "cres": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "cres": "string"
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/payments/{id}/confirm")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "cres": "string"
}
{
  "id": "string",
  "object": "payment",
  "status": "pending",
  "amount": 0,
  "amount_captured": 0,
  "amount_refunded": 0,
  "currency": "string",
  "reference": "string",
  "description": "string",
  "customer": "string",
  "payment_method": {
    "id": "string",
    "type": "card",
    "stored": true,
    "card": {
      "brand": "string",
      "last4": "string",
      "bin": "string",
      "expiry_month": 0,
      "expiry_year": 0,
      "funding": "string",
      "country": "string",
      "issuer": "string"
    }
  },
  "initiated_by": "customer",
  "sequence": "recurring",
  "subscription": "string",
  "three_d_secure": {
    "required": true,
    "status": "pending",
    "version": "string"
  },
  "next_action": {
    "type": "three_d_secure_challenge",
    "challenge": {
      "acs_url": "https://example.com",
      "creq": "string",
      "confirm_url": "https://example.com"
    }
  },
  "decline_code": "insufficient_funds",
  "fee": {
    "amount": 0,
    "currency": "string",
    "settled": true
  },
  "net": {
    "amount": 0,
    "currency": "string"
  },
  "order": {},
  "metadata": {},
  "captured_at": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Refunds

Refund a payment

POST
https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds

Omit amount to refund what remains. Refunds are asynchronous: the answer may be pending and reach succeeded or failed by webhook.

Requires scope: refunds.write. Idempotent: send an Idempotency-Key.

Body

application/json
amountany | null
reasonstring | nullduplicatefraudulentrequested_by_customerother
referencestring | null

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

201Createdobject

The Refund object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Refund a payment
curl -X POST 'https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "duplicate",
    "reference": "string"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "reason": "duplicate",
      "reference": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "reason": "duplicate",
      "reference": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "reason": "duplicate",
  "reference": "string"
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "reason": "duplicate",
    "reference": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "reason": "duplicate",
    "reference": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "reason": "duplicate",
      "reference": "string"
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/payments/{id}/refunds")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "reason": "duplicate",
  "reference": "string"
}
{
  "id": "string",
  "object": "refund",
  "payment": "string",
  "status": "pending",
  "amount": 0,
  "currency": "string",
  "reason": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a refund

GET
https://gateway.sandbox.paayed.com/v1/refunds/{id}

Requires scope: refunds.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Refund object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a refund
curl -X GET 'https://gateway.sandbox.paayed.com/v1/refunds/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/refunds/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/refunds/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/refunds/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/refunds/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/refunds/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/refunds/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "refund",
  "payment": "string",
  "status": "pending",
  "amount": 0,
  "currency": "string",
  "reason": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Customers

List customers

GET
https://gateway.sandbox.paayed.com/v1/customers

Requires scope: customers.read.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
emailstringquery

Response

200OKobject

A page of Customer objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List customers
curl -X GET 'https://gateway.sandbox.paayed.com/v1/customers'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/customers')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/customers", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/customers')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/customers")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "customer",
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "created_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Create a customer

POST
https://gateway.sandbox.paayed.com/v1/customers

Requires scope: customers.write. Idempotent: send an Idempotency-Key.

Body

application/json
namestringrequired
emailstring<email> | null
phoneobject | null
Show child attributes
country_codestring
numberstring
billing_addressobject | null
Show child attributes
line1string
line2string | null
citystring | null
postcodestring | null
countrystring | null
statestring | null
shipping_addressobject | null
Show child attributes
line1string
line2string | null
citystring | null
postcodestring | null
countrystring | null
statestring | null

Parameters

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

201Createdobject

The Customer object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Create a customer
curl -X POST 'https://gateway.sandbox.paayed.com/v1/customers' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  }
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/customers', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/customers", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/customers')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/customers")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  }
}
{
  "id": "string",
  "object": "customer",
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a customer

GET
https://gateway.sandbox.paayed.com/v1/customers/{id}

Requires scope: customers.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Customer object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a customer
curl -X GET 'https://gateway.sandbox.paayed.com/v1/customers/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/customers/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/customers/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/customers/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/customers/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "customer",
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Update a customer

PATCH
https://gateway.sandbox.paayed.com/v1/customers/{id}

Requires scope: customers.write. Idempotent: send an Idempotency-Key.

Body

application/json
namestring
emailstring<email> | null
phoneobject | null
Show child attributes
country_codestring
numberstring
billing_addressobject | null
Show child attributes
line1string
line2string | null
citystring | null
postcodestring | null
countrystring | null
statestring | null
shipping_addressobject | null
Show child attributes
line1string
line2string | null
citystring | null
postcodestring | null
countrystring | null
statestring | null

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Customer object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Update a customer
curl -X PATCH 'https://gateway.sandbox.paayed.com/v1/customers/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/customers/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  }
}

response = requests.patch('https://gateway.sandbox.paayed.com/v1/customers/{id}', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }`)
  req, _ := http.NewRequest("PATCH", "https://gateway.sandbox.paayed.com/v1/customers/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/customers/{id}')
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "name": "string",
    "email": "user@example.com",
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    },
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "postcode": "string",
      "country": "string",
      "state": "string"
    }
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "name": "string",
      "email": "user@example.com",
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "billing_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      },
      "shipping_address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "postcode": "string",
        "country": "string",
        "state": "string"
      }
    });
    let response = client.patch("https://gateway.sandbox.paayed.com/v1/customers/{id}")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  }
}
{
  "id": "string",
  "object": "customer",
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Payment methods

List stored cards

GET
https://gateway.sandbox.paayed.com/v1/payment_methods

Requires scope: payment_methods.read.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
customerstringquery
statusstringactivedetachedallquery

Response

200OKobject

A page of PaymentMethod objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List stored cards
curl -X GET 'https://gateway.sandbox.paayed.com/v1/payment_methods'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/payment_methods')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/payment_methods", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payment_methods')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/payment_methods")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "payment_method",
      "type": "card",
      "customer": "string",
      "card": {
        "brand": "string",
        "last4": "string",
        "bin": "string",
        "expiry_month": 0,
        "expiry_year": 0,
        "funding": "string",
        "country": "string",
        "issuer": "string"
      },
      "setup_payment": "string",
      "status": "active",
      "created_at": "2024-01-15T09:30:00Z",
      "detached_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a stored card

GET
https://gateway.sandbox.paayed.com/v1/payment_methods/{id}

Requires scope: payment_methods.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The PaymentMethod object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a stored card
curl -X GET 'https://gateway.sandbox.paayed.com/v1/payment_methods/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/payment_methods/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/payment_methods/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "payment_method",
  "type": "card",
  "customer": "string",
  "card": {
    "brand": "string",
    "last4": "string",
    "bin": "string",
    "expiry_month": 0,
    "expiry_year": 0,
    "funding": "string",
    "country": "string",
    "issuer": "string"
  },
  "setup_payment": "string",
  "status": "active",
  "created_at": "2024-01-15T09:30:00Z",
  "detached_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Detach a stored card

DELETE
https://gateway.sandbox.paayed.com/v1/payment_methods/{id}

The card can no longer be charged. Subscriptions using it pause.

Requires scope: payment_methods.write. Idempotent: send an Idempotency-Key.

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The PaymentMethod object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Detach a stored card
curl -X DELETE 'https://gateway.sandbox.paayed.com/v1/payment_methods/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("DELETE", "https://gateway.sandbox.paayed.com/v1/payment_methods/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/payment_methods/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.delete("https://gateway.sandbox.paayed.com/v1/payment_methods/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "payment_method",
  "type": "card",
  "customer": "string",
  "card": {
    "brand": "string",
    "last4": "string",
    "bin": "string",
    "expiry_month": 0,
    "expiry_year": 0,
    "funding": "string",
    "country": "string",
    "issuer": "string"
  },
  "setup_payment": "string",
  "status": "active",
  "created_at": "2024-01-15T09:30:00Z",
  "detached_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Subscriptions

List subscriptions

GET
https://gateway.sandbox.paayed.com/v1/subscriptions

Requires scope: subscriptions.read.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
customerstringquery
statusstringactivepausedcancelledexpiredquery

Response

200OKobject

A page of Subscription objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List subscriptions
curl -X GET 'https://gateway.sandbox.paayed.com/v1/subscriptions'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/subscriptions')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/subscriptions", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/subscriptions')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/subscriptions")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "subscription",
      "status": "active",
      "customer": "string",
      "payment_method": "string",
      "amount": 0,
      "currency": "string",
      "interval": "day",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "next_charge_at": "2024-01-15T09:30:00Z",
      "last_charge": {
        "at": "2024-01-15T09:30:00Z",
        "status": "string",
        "payment": "string",
        "failure": "string"
      },
      "retry": {
        "attempt": 0,
        "of": 0,
        "at": "2024-01-15T09:30:00Z"
      },
      "pause_reason": "string",
      "reference": "string",
      "description": "string",
      "metadata": {},
      "created_at": "2024-01-15T09:30:00Z",
      "paused_at": "2024-01-15T09:30:00Z",
      "cancelled_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Create a subscription

POST
https://gateway.sandbox.paayed.com/v1/subscriptions

Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.

Body

application/json
customerstringrequired
payment_methodstringrequired
amountnumberrequired

Decimal major units, at most as many decimal places as the currency allows.

currencystringrequired

An ISO 4217 code the account can take payments in.

intervalstringdayweekmonthyearrequired
start_datestring<date>required
end_datestring<date> | null
referencestring | null
descriptionstring | null
processing_channelstring
metadataarray

Parameters

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

201Createdobject

The Subscription object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Create a subscription
curl -X POST 'https://gateway.sandbox.paayed.com/v1/subscriptions' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer": "string",
    "payment_method": "string",
    "amount": 0,
    "currency": "string",
    "interval": "day",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "processing_channel": "string",
    "metadata": []
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "customer": "string",
      "payment_method": "string",
      "amount": 0,
      "currency": "string",
      "interval": "day",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "processing_channel": "string",
      "metadata": []
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "customer": "string",
      "payment_method": "string",
      "amount": 0,
      "currency": "string",
      "interval": "day",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "processing_channel": "string",
      "metadata": []
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "reference": "string",
  "description": "string",
  "processing_channel": "string",
  "metadata": []
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/subscriptions', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "customer": "string",
    "payment_method": "string",
    "amount": 0,
    "currency": "string",
    "interval": "day",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "processing_channel": "string",
    "metadata": []
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/subscriptions", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/subscriptions')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "customer": "string",
    "payment_method": "string",
    "amount": 0,
    "currency": "string",
    "interval": "day",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "processing_channel": "string",
    "metadata": []
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "customer": "string",
      "payment_method": "string",
      "amount": 0,
      "currency": "string",
      "interval": "day",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "processing_channel": "string",
      "metadata": []
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/subscriptions")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "reference": "string",
  "description": "string",
  "processing_channel": "string",
  "metadata": []
}
{
  "id": "string",
  "object": "subscription",
  "status": "active",
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "next_charge_at": "2024-01-15T09:30:00Z",
  "last_charge": {
    "at": "2024-01-15T09:30:00Z",
    "status": "string",
    "payment": "string",
    "failure": "string"
  },
  "retry": {
    "attempt": 0,
    "of": 0,
    "at": "2024-01-15T09:30:00Z"
  },
  "pause_reason": "string",
  "reference": "string",
  "description": "string",
  "metadata": {},
  "created_at": "2024-01-15T09:30:00Z",
  "paused_at": "2024-01-15T09:30:00Z",
  "cancelled_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a subscription

GET
https://gateway.sandbox.paayed.com/v1/subscriptions/{id}

Requires scope: subscriptions.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Subscription object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a subscription
curl -X GET 'https://gateway.sandbox.paayed.com/v1/subscriptions/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/subscriptions/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/subscriptions/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "subscription",
  "status": "active",
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "next_charge_at": "2024-01-15T09:30:00Z",
  "last_charge": {
    "at": "2024-01-15T09:30:00Z",
    "status": "string",
    "payment": "string",
    "failure": "string"
  },
  "retry": {
    "attempt": 0,
    "of": 0,
    "at": "2024-01-15T09:30:00Z"
  },
  "pause_reason": "string",
  "reference": "string",
  "description": "string",
  "metadata": {},
  "created_at": "2024-01-15T09:30:00Z",
  "paused_at": "2024-01-15T09:30:00Z",
  "cancelled_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Cancel a subscription

DELETE
https://gateway.sandbox.paayed.com/v1/subscriptions/{id}

Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Subscription object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Cancel a subscription
curl -X DELETE 'https://gateway.sandbox.paayed.com/v1/subscriptions/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("DELETE", "https://gateway.sandbox.paayed.com/v1/subscriptions/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.delete("https://gateway.sandbox.paayed.com/v1/subscriptions/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "subscription",
  "status": "active",
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "next_charge_at": "2024-01-15T09:30:00Z",
  "last_charge": {
    "at": "2024-01-15T09:30:00Z",
    "status": "string",
    "payment": "string",
    "failure": "string"
  },
  "retry": {
    "attempt": 0,
    "of": 0,
    "at": "2024-01-15T09:30:00Z"
  },
  "pause_reason": "string",
  "reference": "string",
  "description": "string",
  "metadata": {},
  "created_at": "2024-01-15T09:30:00Z",
  "paused_at": "2024-01-15T09:30:00Z",
  "cancelled_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Update, pause or resume a subscription

PATCH
https://gateway.sandbox.paayed.com/v1/subscriptions/{id}

Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.

Body

application/json
payment_methodstringrequired
statusstringactivepausedrequired
end_datestring<date> | null
referencestring | null
descriptionstring | null
metadataarray

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Subscription object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Update, pause or resume a subscription
curl -X PATCH 'https://gateway.sandbox.paayed.com/v1/subscriptions/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "payment_method": "string",
    "status": "active",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "metadata": []
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "payment_method": "string",
      "status": "active",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "metadata": []
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "payment_method": "string",
      "status": "active",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "metadata": []
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "payment_method": "string",
  "status": "active",
  "end_date": "2024-01-15",
  "reference": "string",
  "description": "string",
  "metadata": []
}

response = requests.patch('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "payment_method": "string",
    "status": "active",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "metadata": []
  }`)
  req, _ := http.NewRequest("PATCH", "https://gateway.sandbox.paayed.com/v1/subscriptions/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/subscriptions/{id}')
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "payment_method": "string",
    "status": "active",
    "end_date": "2024-01-15",
    "reference": "string",
    "description": "string",
    "metadata": []
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "payment_method": "string",
      "status": "active",
      "end_date": "2024-01-15",
      "reference": "string",
      "description": "string",
      "metadata": []
    });
    let response = client.patch("https://gateway.sandbox.paayed.com/v1/subscriptions/{id}")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "payment_method": "string",
  "status": "active",
  "end_date": "2024-01-15",
  "reference": "string",
  "description": "string",
  "metadata": []
}
{
  "id": "string",
  "object": "subscription",
  "status": "active",
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "next_charge_at": "2024-01-15T09:30:00Z",
  "last_charge": {
    "at": "2024-01-15T09:30:00Z",
    "status": "string",
    "payment": "string",
    "failure": "string"
  },
  "retry": {
    "attempt": 0,
    "of": 0,
    "at": "2024-01-15T09:30:00Z"
  },
  "pause_reason": "string",
  "reference": "string",
  "description": "string",
  "metadata": {},
  "created_at": "2024-01-15T09:30:00Z",
  "paused_at": "2024-01-15T09:30:00Z",
  "cancelled_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Webhook endpoints

List webhook endpoints

GET
https://gateway.sandbox.paayed.com/v1/webhook_endpoints

Requires scope: webhooks.write.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
statusstringenableddegradeddisabledquery

Response

200OKobject

A page of WebhookEndpoint objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List webhook endpoints
curl -X GET 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/webhook_endpoints')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/webhook_endpoints")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "webhook_endpoint",
      "url": "https://example.com",
      "description": "string",
      "status": "enabled",
      "enabled_events": [
        "payment.created"
      ],
      "api_version": "string",
      "secret": "string",
      "secret_rotation": {
        "previous_secret_expires_at": "2024-01-15T09:30:00Z"
      },
      "health": {
        "consecutive_failures": 0,
        "failing_since": "2024-01-15T09:30:00Z",
        "last_success_at": "2024-01-15T09:30:00Z",
        "last_failure_at": "2024-01-15T09:30:00Z",
        "disabled_reason": "string"
      },
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Create a webhook endpoint

POST
https://gateway.sandbox.paayed.com/v1/webhook_endpoints

The response carries the signing secret. It is not returned again.

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Body

application/json
urlstringrequired
enabled_eventsArray<string>payment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failedrequired
Show child attributes
descriptionstring | null
api_versionstring2026-09-01

Parameters

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

201Createdobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Create a webhook endpoint
curl -X POST 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "api_version": "2026-09-01"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "api_version": "2026-09-01"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "api_version": "2026-09-01"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "url": "string",
  "enabled_events": [
    "payment.created"
  ],
  "description": "string",
  "api_version": "2026-09-01"
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/webhook_endpoints', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "api_version": "2026-09-01"
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "api_version": "2026-09-01"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "api_version": "2026-09-01"
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/webhook_endpoints")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "url": "string",
  "enabled_events": [
    "payment.created"
  ],
  "description": "string",
  "api_version": "2026-09-01"
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve a webhook endpoint

GET
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}

Requires scope: webhooks.write.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve a webhook endpoint
curl -X GET 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Delete a webhook endpoint

DELETE
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Delete a webhook endpoint
curl -X DELETE 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'DELETE',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'DELETE',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.delete('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("DELETE", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}')
request = Net::HTTP::Delete.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.delete("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Update a webhook endpoint

PATCH
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Body

application/json
urlstringrequired
enabled_eventsArray<string>payment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failedrequired
Show child attributes
descriptionstring | null
statusstringenableddisabledrequired

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Update a webhook endpoint
curl -X PATCH 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "status": "enabled"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "status": "enabled"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "status": "enabled"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "url": "string",
  "enabled_events": [
    "payment.created"
  ],
  "description": "string",
  "status": "enabled"
}

response = requests.patch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "status": "enabled"
  }`)
  req, _ := http.NewRequest("PATCH", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}')
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "url": "string",
    "enabled_events": [
      "payment.created"
    ],
    "description": "string",
    "status": "enabled"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "url": "string",
      "enabled_events": [
        "payment.created"
      ],
      "description": "string",
      "status": "enabled"
    });
    let response = client.patch("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "url": "string",
  "enabled_events": [
    "payment.created"
  ],
  "description": "string",
  "status": "enabled"
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

List deliveries to an endpoint

GET
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries

Requires scope: webhooks.write.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
statusstringpendingsucceededfailedcancelledquery
eventstringquery

Response

200OKobject

A page of WebhookDelivery objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List deliveries to an endpoint
curl -X GET 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/deliveries")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "webhook_delivery",
      "endpoint": "string",
      "event": "string",
      "event_type": "string",
      "status": "pending",
      "attempts": 0,
      "response_status": 0,
      "response_body": "string",
      "error": "string",
      "duration_ms": 0,
      "next_attempt_at": "2024-01-15T09:30:00Z",
      "first_attempted_at": "2024-01-15T09:30:00Z",
      "last_attempted_at": "2024-01-15T09:30:00Z",
      "delivered_at": "2024-01-15T09:30:00Z",
      "attempt_log": [
        {}
      ],
      "created_at": "2024-01-15T09:30:00Z",
      "livemode": true
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Replay events to an endpoint

POST
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Body

application/json
sincestring<date-time>required

An ISO 8601 date or date-time.

typesArray<string>payment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failed
Show child attributes

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

202Acceptedobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Replay events to an endpoint
curl -X POST 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay' \
  -H 'Content-Type: application/json' \
  -d '{
    "since": "2024-01-15T09:30:00Z",
    "types": [
      "payment.created"
    ]
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "since": "2024-01-15T09:30:00Z",
      "types": [
        "payment.created"
      ]
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "since": "2024-01-15T09:30:00Z",
      "types": [
        "payment.created"
      ]
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "since": "2024-01-15T09:30:00Z",
  "types": [
    "payment.created"
  ]
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "since": "2024-01-15T09:30:00Z",
    "types": [
      "payment.created"
    ]
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "since": "2024-01-15T09:30:00Z",
    "types": [
      "payment.created"
    ]
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "since": "2024-01-15T09:30:00Z",
      "types": [
        "payment.created"
      ]
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/replay")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "since": "2024-01-15T09:30:00Z",
  "types": [
    "payment.created"
  ]
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Rotate the signing secret

POST
https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret

Both secrets sign deliveries until the grace period ends, so verification code can switch over without downtime.

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Body

application/json
grace_hoursinteger[1, 168]

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The WebhookEndpoint object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Rotate the signing secret
curl -X POST 'https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "grace_hours": 1
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "grace_hours": 1
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "grace_hours": 1
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "grace_hours": 1
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "grace_hours": 1
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "grace_hours": 1
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "grace_hours": 1
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/webhook_endpoints/{id}/rotate_secret")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "grace_hours": 1
}
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Events

List events

GET
https://gateway.sandbox.paayed.com/v1/events

Requires scope: events.read.

Parameters

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

limitinteger[1, 100]query
starting_afterstringquery
ending_beforestringquery
typestringpayment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failedquery
objectstringquery
created[gte]string<date-time>query
created[lte]string<date-time>query

Response

200OKobject

A page of Event objects.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

List events
curl -X GET 'https://gateway.sandbox.paayed.com/v1/events'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/events')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/events", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/events')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/events")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "object": "event",
      "type": "payment.created",
      "api_version": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "livemode": true,
      "account": "string",
      "sequence": 0,
      "request": {
        "id": "string",
        "idempotency_key": "string"
      },
      "data": {
        "object": {},
        "previous_attributes": {}
      }
    }
  ],
  "has_more": true
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Retrieve an event

GET
https://gateway.sandbox.paayed.com/v1/events/{id}

Requires scope: events.read.

Parameters

idstringrequiredpath

The object's identifier.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

200OKobject

The Event object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Retrieve an event
curl -X GET 'https://gateway.sandbox.paayed.com/v1/events/{id}'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events/{id}', {
  method: 'GET',
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events/{id}', {
  method: 'GET',
});

const data: Record<string, unknown> = await response.json();
import requests

response = requests.get('https://gateway.sandbox.paayed.com/v1/events/{id}')
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://gateway.sandbox.paayed.com/v1/events/{id}", nil)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/events/{id}')
request = Net::HTTP::Get.new(uri)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let response = client.get("https://gateway.sandbox.paayed.com/v1/events/{id}")
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
{
  "id": "string",
  "object": "event",
  "type": "payment.created",
  "api_version": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true,
  "account": "string",
  "sequence": 0,
  "request": {
    "id": "string",
    "idempotency_key": "string"
  },
  "data": {
    "object": {},
    "previous_attributes": {}
  }
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Resend an event

POST
https://gateway.sandbox.paayed.com/v1/events/{id}/resend

Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.

Body

application/json
endpointstring | null

Parameters

idstringrequiredpath

The object's identifier.

Idempotency-Keystringrequiredheader

Required on every write. Retrying with the same key returns the stored response with Idempotent-Replay: true; the same key with a different body is a 409.

Paayed-Versionstring2026-09-01header

Overrides the key's pinned version for this request.

Response

202Acceptedobject

The Event object.

defaultobject

Any failure. The status code tells you the class; error.code tells you which.

Authorization

secretKeyhttp (bearer)

Your secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.

Resend an event
curl -X POST 'https://gateway.sandbox.paayed.com/v1/events/{id}/resend' \
  -H 'Content-Type: application/json' \
  -d '{
    "endpoint": "string"
  }'
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events/{id}/resend', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "endpoint": "string"
    }),
});

const data = await response.json();
const response = await fetch('https://gateway.sandbox.paayed.com/v1/events/{id}/resend', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "endpoint": "string"
    }),
});

const data: Record<string, unknown> = await response.json();
import requests

payload = {
  "endpoint": "string"
}

response = requests.post('https://gateway.sandbox.paayed.com/v1/events/{id}/resend', json=payload)
data = response.json()
package main

import (
  "fmt"
  "io"
  "net/http"
  "strings"
)

func main() {
  body := strings.NewReader(`{
    "endpoint": "string"
  }`)
  req, _ := http.NewRequest("POST", "https://gateway.sandbox.paayed.com/v1/events/{id}/resend", body)
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  data, _ := io.ReadAll(resp.Body)
  fmt.Println(string(data))
}
require 'net/http'
require 'json'

uri = URI('https://gateway.sandbox.paayed.com/v1/events/{id}/resend')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
    "endpoint": "string"
  }'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
data = JSON.parse(response.body)
use reqwest;

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let client = reqwest::Client::new();
    let body = serde_json::json!({
      "endpoint": "string"
    });
    let response = client.post("https://gateway.sandbox.paayed.com/v1/events/{id}/resend")
        .json(&body)
        .send()
        .await?
        .text()
        .await?;
    println!("{}", response);
    Ok(())
}
Request Body
{
  "endpoint": "string"
}
{
  "id": "string",
  "object": "event",
  "type": "payment.created",
  "api_version": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true,
  "account": "string",
  "sequence": 0,
  "request": {
    "id": "string",
    "idempotency_key": "string"
  },
  "data": {
    "object": {},
    "previous_attributes": {}
  }
}
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Models

Payment

object

A payment: one attempt to take money from a card, and everything that happened to it since.

idstringrequired

Opaque identifier starting with pay_

objectstringpaymentrequired
statusstringpendingrequires_actionauthorizedsucceededdeclinedfailedcancelledexpiredrefundedpartially_refundedon_holddisputedrequired
amountnumberrequired

The amount requested.

amount_capturednumber

What has been captured so far.

amount_refundednumber

What has been refunded so far.

currencystring | nullrequired

ISO 4217, upper case.

referencestring | null

Your reference, shown on the dashboard and the receipt.

descriptionstring | null
customerstring | null

Opaque identifier starting with cust_

payment_methodobject
Show child attributes
idstring | null

Present when the card is stored against the customer.

typestringcard
storedboolean
cardobject
Show child attributes
brandstring | null

visa, mastercard, amex and so on, lower case.

last4string | null
binstring | null

The first eight digits.

expiry_monthinteger | null
expiry_yearinteger | null
fundingstring | null

credit, debit or prepaid, when known.

countrystring | null

Issuing country, ISO 3166-1 alpha-2, when known.

issuerstring | null
initiated_bystringcustomermerchant
sequencestring | nullrecurringunscheduled
subscriptionstring | null

Opaque identifier starting with subs_

three_d_secureobject
Show child attributes
requiredboolean
statusstring | nullpendingauthenticated
versionstring | null
next_actionobject | null

Present only while status is requires_action.

Show child attributes

Present only while status is requires_action.

typestringthree_d_secure_challenge
challengeobject
Show child attributes
acs_urlstring<uri>

Where to send the cardholder's browser.

creqstring

The challenge request to post to acs_url.

confirm_urlstring<uri>

Where to post the cres the ACS returns.

decline_codestring | nullinsufficient_fundsdo_not_honorlost_or_stolenexpired_cardincorrect_cvcincorrect_numberauthentication_failedauthentication_requiredtransaction_not_allowedcurrency_not_supportedlimit_exceededsuspected_fraudprocessing_error

Set when status is declined or failed. Ours, never the acquirer's.

feeobject | null
Show child attributes
amountnumber

Decimal major units, e.g. 42.5 for £42.50.

currencystring | null

ISO 4217, upper case.

settledboolean

False while the fee is an estimate.

netobject | null
Show child attributes
amountnumber

Decimal major units, e.g. 42.5 for £42.50.

currencystring | null

ISO 4217, upper case.

orderobject | null

The order object exactly as sent.

metadataobject

Up to 50 string values of yours, returned unchanged.

captured_atstring<date-time> | null

ISO 8601, UTC.

created_atstring<date-time>required

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "payment",
  "status": "pending",
  "amount": 0,
  "amount_captured": 0,
  "amount_refunded": 0,
  "currency": "string",
  "reference": "string",
  "description": "string",
  "customer": "string",
  "payment_method": {
    "id": "string",
    "type": "card",
    "stored": true,
    "card": {
      "brand": "string",
      "last4": "string",
      "bin": "string",
      "expiry_month": 0,
      "expiry_year": 0,
      "funding": "string",
      "country": "string",
      "issuer": "string"
    }
  },
  "initiated_by": "customer",
  "sequence": "recurring",
  "subscription": "string",
  "three_d_secure": {
    "required": true,
    "status": "pending",
    "version": "string"
  },
  "next_action": {
    "type": "three_d_secure_challenge",
    "challenge": {
      "acs_url": "https://example.com",
      "creq": "string",
      "confirm_url": "https://example.com"
    }
  },
  "decline_code": "insufficient_funds",
  "fee": {
    "amount": 0,
    "currency": "string",
    "settled": true
  },
  "net": {
    "amount": 0,
    "currency": "string"
  },
  "order": {},
  "metadata": {},
  "captured_at": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

Customer

object

Someone who pays you. Cards are stored against a customer.

idstringrequired

Opaque identifier starting with cust_

objectstringcustomerrequired
namestring | null
emailstring<email> | null
phoneobject | null
Show child attributes
country_codestring
numberstring
billing_addressobject | null
shipping_addressobject | null
created_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "customer",
  "name": "string",
  "email": "user@example.com",
  "phone": {
    "country_code": "string",
    "number": "string"
  },
  "billing_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "shipping_address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "postcode": "string",
    "country": "string",
    "state": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

Refund

object

Money returned to the cardholder after capture. Asynchronous: pending until the acquirer answers, then succeeded or failed.

idstringrequired

Opaque identifier starting with ref_

objectstringrefundrequired
paymentstringrequired

Opaque identifier starting with pay_

statusstringpendingsucceededfailedrequires_actionrequired
amountnumberrequired

Decimal major units, e.g. 42.5 for £42.50.

currencystring | nullrequired

ISO 4217, upper case.

reasonstring | null
created_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "refund",
  "payment": "string",
  "status": "pending",
  "amount": 0,
  "currency": "string",
  "reason": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

PaymentMethod

object

A card stored against a customer by a successful payment that asked for it to be stored.

idstringrequired

Opaque identifier starting with pmth_

objectstringpayment_methodrequired
typestringcardrequired
customerstringrequired

Opaque identifier starting with cust_

cardobjectrequired
Show child attributes
brandstring | null

visa, mastercard, amex and so on, lower case.

last4string | null
binstring | null

The first eight digits.

expiry_monthinteger | null
expiry_yearinteger | null
fundingstring | null

credit, debit or prepaid, when known.

countrystring | null

Issuing country, ISO 3166-1 alpha-2, when known.

issuerstring | null
setup_paymentstring | null

The payment that stored the card.

statusstringactivedetachedrequired
created_atstring<date-time> | null

ISO 8601, UTC.

detached_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "payment_method",
  "type": "card",
  "customer": "string",
  "card": {
    "brand": "string",
    "last4": "string",
    "bin": "string",
    "expiry_month": 0,
    "expiry_year": 0,
    "funding": "string",
    "country": "string",
    "issuer": "string"
  },
  "setup_payment": "string",
  "status": "active",
  "created_at": "2024-01-15T09:30:00Z",
  "detached_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

Subscription

object

A fixed schedule that charges a stored card. Retries three times after a failed charge, then pauses.

idstringrequired

Opaque identifier starting with subs_

objectstringsubscriptionrequired
statusstringactivepausedcancelledexpiredrequired
customerstring | null

Opaque identifier starting with cust_

payment_methodstring | null

Opaque identifier starting with pmth_

amountnumberrequired

Decimal major units, e.g. 42.5 for £42.50.

currencystring | nullrequired

ISO 4217, upper case.

intervalstringdayweekmonthyearrequired
start_datestring<date>required
end_datestring<date> | null
next_charge_atstring<date-time> | null

ISO 8601, UTC.

last_chargeobject | null
Show child attributes
atstring<date-time>

ISO 8601, UTC.

statusstring | null
paymentstring | null

Opaque identifier starting with pay_

failurestring | null
retryobject | null
Show child attributes
attemptinteger
ofinteger
atstring<date-time>

ISO 8601, UTC.

pause_reasonstring | null
referencestring | null
descriptionstring | null
metadataobject

Up to 50 string values of yours, returned unchanged.

created_atstring<date-time> | null

ISO 8601, UTC.

paused_atstring<date-time> | null

ISO 8601, UTC.

cancelled_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "subscription",
  "status": "active",
  "customer": "string",
  "payment_method": "string",
  "amount": 0,
  "currency": "string",
  "interval": "day",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "next_charge_at": "2024-01-15T09:30:00Z",
  "last_charge": {
    "at": "2024-01-15T09:30:00Z",
    "status": "string",
    "payment": "string",
    "failure": "string"
  },
  "retry": {
    "attempt": 0,
    "of": 0,
    "at": "2024-01-15T09:30:00Z"
  },
  "pause_reason": "string",
  "reference": "string",
  "description": "string",
  "metadata": {},
  "created_at": "2024-01-15T09:30:00Z",
  "paused_at": "2024-01-15T09:30:00Z",
  "cancelled_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

WebhookEndpoint

object

A URL of yours that receives events. The signing secret is returned once, on creation and on rotation.

idstringrequired

Opaque identifier starting with hook_

objectstringwebhook_endpointrequired
urlstring<uri>required
descriptionstring | null
statusstringenableddegradeddisabledrequired
enabled_eventsArray<string>payment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failedrequired
api_versionstring | null
secretstring

pyd_webhook_...; present only in the response that created or rotated it.

secret_rotationobject | null
Show child attributes
previous_secret_expires_atstring<date-time> | null

ISO 8601, UTC.

healthobject
Show child attributes
consecutive_failuresinteger
failing_sincestring<date-time> | null

ISO 8601, UTC.

last_success_atstring<date-time> | null

ISO 8601, UTC.

last_failure_atstring<date-time> | null

ISO 8601, UTC.

disabled_reasonstring | null
created_atstring<date-time> | null

ISO 8601, UTC.

updated_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "webhook_endpoint",
  "url": "https://example.com",
  "description": "string",
  "status": "enabled",
  "enabled_events": [
    "payment.created"
  ],
  "api_version": "string",
  "secret": "string",
  "secret_rotation": {
    "previous_secret_expires_at": "2024-01-15T09:30:00Z"
  },
  "health": {
    "consecutive_failures": 0,
    "failing_since": "2024-01-15T09:30:00Z",
    "last_success_at": "2024-01-15T09:30:00Z",
    "last_failure_at": "2024-01-15T09:30:00Z",
    "disabled_reason": "string"
  },
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

WebhookDelivery

object

One event sent to one endpoint: every attempt, what came back, and when the next attempt is due.

idstringrequired

Opaque identifier starting with dlvr_

objectstringwebhook_deliveryrequired
endpointstring | null

Opaque identifier starting with hook_

eventstring | null

Opaque identifier starting with evnt_

event_typestring | null
statusstringpendingdeliveredfailedexhaustedskippedrequired
attemptsintegerrequired
response_statusinteger | null
response_bodystring | null

The first kilobyte of the response.

errorstring | null
duration_msinteger | null
next_attempt_atstring<date-time> | null

ISO 8601, UTC.

first_attempted_atstring<date-time> | null

ISO 8601, UTC.

last_attempted_atstring<date-time> | null

ISO 8601, UTC.

delivered_atstring<date-time> | null

ISO 8601, UTC.

attempt_logArray<object>
created_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

Example
{
  "id": "string",
  "object": "webhook_delivery",
  "endpoint": "string",
  "event": "string",
  "event_type": "string",
  "status": "pending",
  "attempts": 0,
  "response_status": 0,
  "response_body": "string",
  "error": "string",
  "duration_ms": 0,
  "next_attempt_at": "2024-01-15T09:30:00Z",
  "first_attempted_at": "2024-01-15T09:30:00Z",
  "last_attempted_at": "2024-01-15T09:30:00Z",
  "delivered_at": "2024-01-15T09:30:00Z",
  "attempt_log": [
    {}
  ],
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true
}

Event

object

Something that happened to an object of yours. The same shape is delivered to webhook endpoints.

idstringrequired

Opaque identifier starting with evnt_

objectstringeventrequired
typestringpayment.createdpayment.requires_actionpayment.authorizedpayment.capturedpayment.succeededpayment.declinedpayment.failedpayment.cancelledpayment.expiredrefund.createdrefund.succeededrefund.failedhosted_session.completedhosted_session.expiredcustomer.createdcustomer.updatedcustomer.deletedpayment_method.attachedpayment_method.detachedpayment_method.expiringsubscription.createdsubscription.chargedsubscription.charge_failedsubscription.pausedsubscription.cancelledsubscription.resumeddispute.openeddispute.updateddispute.closedpayout.paidpayout.failedrequired
api_versionstringrequired
created_atstring<date-time> | null

ISO 8601, UTC.

livemodebooleanrequired

True on gateway.paayed.com, false in the sandbox.

accountstring

Opaque identifier starting with merch_

sequenceinteger

Increases with every event on the same object; drop an event whose sequence is not greater than the last one you applied.

requestobject | null
Show child attributes
idstring
idempotency_keystring | null
dataobjectrequired
Show child attributes
objectobject

The object as it was when the event occurred.

previous_attributesobject

The attributes that changed, with their previous values.

Example
{
  "id": "string",
  "object": "event",
  "type": "payment.created",
  "api_version": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "livemode": true,
  "account": "string",
  "sequence": 0,
  "request": {
    "id": "string",
    "idempotency_key": "string"
  },
  "data": {
    "object": {},
    "previous_attributes": {}
  }
}

Error

object

Every failure, from the edge or the origin, in one envelope.

errorobjectrequired
Show child attributes
typestringinvalid_request_errorauthentication_errorpermission_erroridempotency_errorvalidation_errorcard_errorrate_limit_errorapi_errorrequired
codestringrequired
messagestringrequired
paramstring | null

The parameter at fault, when there is one.

request_idstringrequired

Quote it in every support conversation.

errorsArray<object>

On validation_error, one entry per field.

Show child attributes
paramstring
messagestring
Example
{
  "error": {
    "type": "invalid_request_error",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string",
    "errors": [
      {
        "param": "string",
        "message": "string"
      }
    ]
  }
}

Address

object

A postal address.

line1string | null
line2string | null
citystring | null
postcodestring | null
countrystring | null

ISO 3166-1 alpha-2.

statestring | null
Example
{
  "line1": "string",
  "line2": "string",
  "city": "string",
  "postcode": "string",
  "country": "string",
  "state": "string"
}
Built with Sourcey