Paayed Payments API
v2026-09-01Take card payments, store cards, run subscriptions and receive events.
Generated from the code by php artisan public-api:openapi; do not edit by hand.
https://gateway.sandbox.paayed.comSandbox. Test keys, test cards, no real money.https://gateway.paayed.comProduction.Authentication
secretKeyhttpYour secret key: pyd_secret_test_... in the sandbox, pyd_secret_live_... in production.
Scheme: bearer
Payments
List payments
Requires scope: payments.read.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerystatusstringpendingrequires_actionauthorizedsucceededdeclinedfailedcancelledexpiredrefundedpartially_refundedon_holddisputedquerycustomerstringqueryreferencestringquerypayment_methodstringquerysubscriptionstringquerycreated[gte]string<date-time>querycreated[lte]string<date-time>queryResponse
A page of Payment objects.
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.
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
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
amountnumberrequiredDecimal major units, at most as many decimal places as the currency allows.
currencystringrequiredAn ISO 4217 code the account can take payments in.
capturebooleanreferencestringrequireddescriptionstring | nullcustomerobjectprocessing_channelstringorderobjectmetadataarraypayment_methodobjectrequiredinitiated_bystringcustomerstorebooleanthree_d_secureobjectreturn_urlstring<uri>amountnumberrequiredDecimal major units, at most as many decimal places as the currency allows.
currencystringrequiredAn ISO 4217 code the account can take payments in.
capturebooleanreferencestringrequireddescriptionstring | nullcustomerobjectprocessing_channelstringorderobjectmetadataarraypayment_methodstringrequiredinitiated_bystringmerchantrequiredsequencestringrecurringunscheduledrequiredParameters
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Payment object.
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.
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(())
}{
"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
Requires scope: payments.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The Payment object.
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.
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 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
cresstringrequiredParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Payment object.
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.
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(())
}{
"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
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
amountany | nullreasonstring | nullduplicatefraudulentrequested_by_customerotherreferencestring | nullParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Refund object.
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.
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(())
}{
"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
Requires scope: refunds.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The Refund object.
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.
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
Requires scope: customers.read.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringqueryemailstringqueryResponse
A page of Customer objects.
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.
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
Requires scope: customers.write. Idempotent: send an Idempotency-Key.
Body
namestringrequiredemailstring<email> | nullphoneobject | nullbilling_addressobject | nullshipping_addressobject | nullParameters
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Customer object.
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.
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(())
}{
"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
Requires scope: customers.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The Customer object.
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.
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
Requires scope: customers.write. Idempotent: send an Idempotency-Key.
Body
namestringemailstring<email> | nullphoneobject | nullbilling_addressobject | nullshipping_addressobject | nullParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Customer object.
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.
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(())
}{
"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
Requires scope: payment_methods.read.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerycustomerstringquerystatusstringactivedetachedallqueryResponse
A page of PaymentMethod objects.
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.
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
Requires scope: payment_methods.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The PaymentMethod object.
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.
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
The card can no longer be charged. Subscriptions using it pause.
Requires scope: payment_methods.write. Idempotent: send an Idempotency-Key.
Parameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The PaymentMethod object.
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.
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
Requires scope: subscriptions.read.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerycustomerstringquerystatusstringactivepausedcancelledexpiredqueryResponse
A page of Subscription objects.
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.
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
Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.
Body
customerstringrequiredpayment_methodstringrequiredamountnumberrequiredDecimal major units, at most as many decimal places as the currency allows.
currencystringrequiredAn ISO 4217 code the account can take payments in.
intervalstringdayweekmonthyearrequiredstart_datestring<date>requiredend_datestring<date> | nullreferencestring | nulldescriptionstring | nullprocessing_channelstringmetadataarrayParameters
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Subscription object.
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.
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(())
}{
"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
Requires scope: subscriptions.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The Subscription object.
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.
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
Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.
Parameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Subscription object.
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.
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
Requires scope: subscriptions.write. Idempotent: send an Idempotency-Key.
Body
payment_methodstringrequiredstatusstringactivepausedrequiredend_datestring<date> | nullreferencestring | nulldescriptionstring | nullmetadataarrayParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Subscription object.
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.
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(())
}{
"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
Requires scope: webhooks.write.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerystatusstringenableddegradeddisabledqueryResponse
A page of WebhookEndpoint objects.
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.
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
The response carries the signing secret. It is not returned again.
Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.
Body
urlstringrequiredenabled_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.failedrequireddescriptionstring | nullapi_versionstring2026-09-01Parameters
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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(())
}{
"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
Requires scope: webhooks.write.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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
Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.
Parameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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
Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.
Body
urlstringrequiredenabled_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.failedrequireddescriptionstring | nullstatusstringenableddisabledrequiredParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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(())
}{
"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
Requires scope: webhooks.write.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerystatusstringpendingsucceededfailedcancelledqueryeventstringqueryResponse
A page of WebhookDelivery objects.
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.
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
Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.
Body
sincestring<date-time>requiredAn 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.failedParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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(())
}{
"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
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
grace_hoursinteger[1, 168]Parameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The WebhookEndpoint object.
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.
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(())
}{
"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
Requires scope: events.read.
Parameters
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
limitinteger[1, 100]querystarting_afterstringqueryending_beforestringquerytypestringpayment.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.failedqueryobjectstringquerycreated[gte]string<date-time>querycreated[lte]string<date-time>queryResponse
A page of Event objects.
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.
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
Requires scope: events.read.
Parameters
idstringrequiredpathThe object's identifier.
Paayed-Versionstring2026-09-01headerOverrides the key's pinned version for this request.
Response
The Event object.
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.
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
Requires scope: webhooks.write. Idempotent: send an Idempotency-Key.
Body
endpointstring | nullParameters
idstringrequiredpathThe object's identifier.
Idempotency-KeystringrequiredheaderRequired 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-01headerOverrides the key's pinned version for this request.
Response
The Event object.
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.
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(())
}{
"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
objectA payment: one attempt to take money from a card, and everything that happened to it since.
idstringrequiredOpaque identifier starting with pay_
objectstringpaymentrequiredstatusstringpendingrequires_actionauthorizedsucceededdeclinedfailedcancelledexpiredrefundedpartially_refundedon_holddisputedrequiredamountnumberrequiredThe amount requested.
amount_capturednumberWhat has been captured so far.
amount_refundednumberWhat has been refunded so far.
currencystring | nullrequiredISO 4217, upper case.
referencestring | nullYour reference, shown on the dashboard and the receipt.
descriptionstring | nullcustomerstring | nullOpaque identifier starting with cust_
payment_methodobjectinitiated_bystringcustomermerchantsequencestring | nullrecurringunscheduledsubscriptionstring | nullOpaque identifier starting with subs_
three_d_secureobjectnext_actionobject | nullPresent only while status is requires_action.
decline_codestring | nullinsufficient_fundsdo_not_honorlost_or_stolenexpired_cardincorrect_cvcincorrect_numberauthentication_failedauthentication_requiredtransaction_not_allowedcurrency_not_supportedlimit_exceededsuspected_fraudprocessing_errorSet when status is declined or failed. Ours, never the acquirer's.
feeobject | nullnetobject | nullorderobject | nullThe order object exactly as sent.
metadataobjectUp to 50 string values of yours, returned unchanged.
captured_atstring<date-time> | nullISO 8601, UTC.
created_atstring<date-time>requiredISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectSomeone who pays you. Cards are stored against a customer.
idstringrequiredOpaque identifier starting with cust_
objectstringcustomerrequirednamestring | nullemailstring<email> | nullphoneobject | nullbilling_addressobject | nullshipping_addressobject | nullcreated_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectMoney returned to the cardholder after capture. Asynchronous: pending until the acquirer answers, then succeeded or failed.
idstringrequiredOpaque identifier starting with ref_
objectstringrefundrequiredpaymentstringrequiredOpaque identifier starting with pay_
statusstringpendingsucceededfailedrequires_actionrequiredamountnumberrequiredDecimal major units, e.g. 42.5 for £42.50.
currencystring | nullrequiredISO 4217, upper case.
reasonstring | nullcreated_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"id": "string",
"object": "refund",
"payment": "string",
"status": "pending",
"amount": 0,
"currency": "string",
"reason": "string",
"created_at": "2024-01-15T09:30:00Z",
"livemode": true
}PaymentMethod
objectA card stored against a customer by a successful payment that asked for it to be stored.
idstringrequiredOpaque identifier starting with pmth_
objectstringpayment_methodrequiredtypestringcardrequiredcustomerstringrequiredOpaque identifier starting with cust_
cardobjectrequiredsetup_paymentstring | nullThe payment that stored the card.
statusstringactivedetachedrequiredcreated_atstring<date-time> | nullISO 8601, UTC.
detached_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectA fixed schedule that charges a stored card. Retries three times after a failed charge, then pauses.
idstringrequiredOpaque identifier starting with subs_
objectstringsubscriptionrequiredstatusstringactivepausedcancelledexpiredrequiredcustomerstring | nullOpaque identifier starting with cust_
payment_methodstring | nullOpaque identifier starting with pmth_
amountnumberrequiredDecimal major units, e.g. 42.5 for £42.50.
currencystring | nullrequiredISO 4217, upper case.
intervalstringdayweekmonthyearrequiredstart_datestring<date>requiredend_datestring<date> | nullnext_charge_atstring<date-time> | nullISO 8601, UTC.
last_chargeobject | nullretryobject | nullpause_reasonstring | nullreferencestring | nulldescriptionstring | nullmetadataobjectUp to 50 string values of yours, returned unchanged.
created_atstring<date-time> | nullISO 8601, UTC.
paused_atstring<date-time> | nullISO 8601, UTC.
cancelled_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectA URL of yours that receives events. The signing secret is returned once, on creation and on rotation.
idstringrequiredOpaque identifier starting with hook_
objectstringwebhook_endpointrequiredurlstring<uri>requireddescriptionstring | nullstatusstringenableddegradeddisabledrequiredenabled_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.failedrequiredapi_versionstring | nullsecretstringpyd_webhook_...; present only in the response that created or rotated it.
secret_rotationobject | nullhealthobjectcreated_atstring<date-time> | nullISO 8601, UTC.
updated_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectOne event sent to one endpoint: every attempt, what came back, and when the next attempt is due.
idstringrequiredOpaque identifier starting with dlvr_
objectstringwebhook_deliveryrequiredendpointstring | nullOpaque identifier starting with hook_
eventstring | nullOpaque identifier starting with evnt_
event_typestring | nullstatusstringpendingdeliveredfailedexhaustedskippedrequiredattemptsintegerrequiredresponse_statusinteger | nullresponse_bodystring | nullThe first kilobyte of the response.
errorstring | nullduration_msinteger | nullnext_attempt_atstring<date-time> | nullISO 8601, UTC.
first_attempted_atstring<date-time> | nullISO 8601, UTC.
last_attempted_atstring<date-time> | nullISO 8601, UTC.
delivered_atstring<date-time> | nullISO 8601, UTC.
attempt_logArray<object>created_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
{
"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
objectSomething that happened to an object of yours. The same shape is delivered to webhook endpoints.
idstringrequiredOpaque identifier starting with evnt_
objectstringeventrequiredtypestringpayment.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.failedrequiredapi_versionstringrequiredcreated_atstring<date-time> | nullISO 8601, UTC.
livemodebooleanrequiredTrue on gateway.paayed.com, false in the sandbox.
accountstringOpaque identifier starting with merch_
sequenceintegerIncreases with every event on the same object; drop an event whose sequence is not greater than the last one you applied.
requestobject | nulldataobjectrequired{
"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": {}
}
}