Third-Party Integration

Third-Party Integration

Integrates external APIs such as payment, messaging and analytics services with retries, error handling, authentication and data transformation.

Skill files8 files

references/

scripts/

templates/

SKILL.md103 lines
1
---
2
name: third-party-integration
3
description: >
4
Integrate external APIs and services with error handling, retry logic, and
5
data transformation. Use when connecting to payment processors, messaging
6
services, analytics platforms, or other third-party providers.
7
---
8
9
# Third-Party Integration
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Build robust integrations with external services using standardized patterns for API calls, error handling, authentication, and data transformation.
22
23
## When to Use
24
25
- Integrating payment processors (Stripe, PayPal)
26
- Using messaging services (SendGrid, Twilio)
27
- Connecting to analytics platforms (Mixpanel, Segment)
28
- Syncing with storage services (AWS S3, Google Cloud)
29
- Integrating CRM systems (Salesforce, HubSpot)
30
- Building multi-service architectures
31
32
## Quick Start
33
34
Minimal working example:
35
36
```javascript
37
const axios = require("axios");
38
39
class ThirdPartyClient {
40
constructor(config) {
41
this.apiKey = config.apiKey;
42
this.baseUrl = config.baseUrl;
43
this.timeout = config.timeout || 30000;
44
this.retryAttempts = config.retryAttempts || 3;
45
this.retryDelay = config.retryDelay || 1000;
46
this.client = axios.create({
47
baseURL: this.baseUrl,
48
timeout: this.timeout,
49
headers: {
50
Authorization: `Bearer ${this.apiKey}`,
51
"Content-Type": "application/json",
52
},
53
});
54
}
55
56
async request(method, endpoint, data = null, options = {}) {
57
let lastError;
58
59
for (let attempt = 0; attempt < this.retryAttempts; attempt++) {
60
try {
61
const response = await this.client({
62
// ... (see reference guides for full implementation)
63
```
64
65
## Reference Guides
66
67
Detailed implementations in the `references/` directory:
68
69
| Guide | Contents |
70
|---|---|
71
| [Third-Party Client Wrapper](references/third-party-client-wrapper.md) | Third-Party Client Wrapper |
72
| [Payment Processor Integration (Stripe)](references/payment-processor-integration-stripe.md) | Payment Processor Integration (Stripe) |
73
| [Email Service Integration (SendGrid)](references/email-service-integration-sendgrid.md) | Email Service Integration (SendGrid) |
74
| [Python Third-Party Integration](references/python-third-party-integration.md) | Python Third-Party Integration |
75
| [Data Transformation](references/data-transformation.md) | Data Transformation |
76
77
## Best Practices
78
79
### ✅ DO
80
81
- Implement retry logic with exponential backoff
82
- Validate webhook signatures
83
- Log all API interactions
84
- Use environment variables for secrets
85
- Transform API responses to internal models
86
- Implement circuit breakers for critical services
87
- Monitor API quota and rate limits
88
- Add proper error handling
89
- Use timeouts appropriately
90
- Test with sandbox/test API keys
91
92
### ❌ DON'T
93
94
- Hardcode API keys
95
- Retry all errors indefinitely
96
- Log sensitive data
97
- Trust unvalidated webhook data
98
- Ignore rate limits
99
- Make synchronous blocking calls
100
- Expose vendor-specific details to clients
101
- Skip error handling
102
- Use production keys in tests
103

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,983 prompts

More by @OpenSourceBuffGuy

See all
Luxury Food Poster Template prompt image

Luxury Food Poster Template

Fills a luxury food advertisement poster template: a hero dessert or drink with floating ingredients, splash effects and styled lighting, with a cheat sheet of options.

image-prompt, gpt-image, template, placeholders, food-photography, poster, photorealistic, product-photography, advertising, luxury, cooking, vertical-format, studio-lighting, motion-blur, macro, vibrant-colors, cheat-sheet, for-marketers, for-photographers, ad-copy, text-rendering, chatgpt, cinematic, for-online-sellers

Protocol Reverse Engineering prompt image

Protocol Reverse Engineering

Teaches the AI to capture and dissect network traffic, reverse engineer custom protocols and document them for research, interoperability and debugging.

agent-skill, network-engineering, cybersecurity, security-testing, for-security-professionals, debugging, troubleshooting, documentation, log-analysis, codebase-analysis, command-line, bash, python, cryptography, long-form, advanced, step-by-step-guide, for-developers, cheat-sheet, technical-spec, linux

Neon Fluid Cyber Diagnostic Poster prompt image

Neon Fluid Cyber Diagnostic Poster

Defines a JSON poster style of a monochrome industrial machine photo with liquid neon glow, cropped giant type, magnifier circles, circuit annotations and photocopy grain.

image-prompt, json-prompt, placeholders, poster, typography, structured-output, long-form, advanced, for-designers, for-artists, futuristic, cyberpunk, editorial, photorealistic, neon, film-grain, text-rendering, limited-palette, diagram, dramatic-lighting, graphic-design, style-reference, dark-fantasy

Reviews

Loading reviews…

Discussion

Loading comments…