LLM Skills
~/catalogue/déploiement et infra//payments-api

API de paiements

/payments-api

L’API Payments permet de traiter les paiements des commandes BigCommerce via des passerelles compatibles et l’infrastructure conforme PCI de BigCommerce.

qdhenryqdhenry
1.3k
1 mars 2026
// contenu du skill

<overview>

The Payments API enables payment processing for BigCommerce orders. It works with supported payment gateways to process transactions securely through BigCommerce's PCI-compliant infrastructure.

</overview>

<endpoints>

<base_urls>

  • Payment Access Token: https://api.bigcommerce.com/stores/{store_hash}/v3/payments/access_tokens
  • Process Payment: https://payments.bigcommerce.com/stores/{store_hash}/payments

</base_urls>

<rate_limit>

50 requests per 4 seconds - More restrictive than standard APIs.

</rate_limit>

</endpoints>

<payment_flow>

<overview>

  1. Create order or checkout
  2. Generate Payment Access Token (PAT)
  3. Process payment using PAT
  4. Handle result

</overview>

<step1create_order>

Create an order that needs payment:

bash
POST /v2/orders
{
  "customer_id": 123,
  "billing_address": {...},
  "products": [...],
  "status_id": 0  # Incomplete - awaiting payment
}

Or use Checkout API for cart-based flow.

</step1create_order>

<step2create_pat>

Generate Payment Access Token:

bash
POST /v3/payments/access_tokens
X-Auth-Token: {access_token}
Content-Type: application/json

{
  "order": {
    "id": 12345
  }
}

Response:

json
{
  "data": {
    "id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9..."
  }
}

The PAT is valid for one payment attempt.

</step2create_pat>

<step3process_payment>

Process payment (note: different host):

bash
POST https://payments.bigcommerce.com/stores/{store_hash}/payments
Authorization: PAT {payment_access_token}
Content-Type: application/json

{
  "payment": {
    "instrument": {
      "type": "card",
      "cardholder_name": "John Doe",
      "number": "4111111111111111",
      "expiry_month": 12,
      "expiry_year": 2025,
      "verification_value": "123"
    },
    "payment_method_id": "stripe.card"
  }
}

Important: This request goes to payments.bigcommerce.com, not api.bigcommerce.com.

</step3process_payment>

<step4handle_result>

Success response:

json
{
  "data": {
    "id": "payment_uuid",
    "status": "success",
    "transaction_type": "purchase"
  }
}

Order status automatically updates to "Awaiting Fulfillment" (11).

</step4handle_result>

</payment_flow>

<payment_instruments>

<credit_card>

json
{
  "instrument": {
    "type": "card",
    "cardholder_name": "John Doe",
    "number": "4111111111111111",
    "expiry_month": 12,
    "expiry_year": 2025,
    "verification_value": "123"
  },
  "payment_method_id": "stripe.card"
}

</credit_card>

<stored_card>

Use previously stored payment method:

json
{
  "instrument": {
    "type": "stored_card",
    "token": "stored_card_token_from_vault"
  },
  "payment_method_id": "stripe.card"
}

</stored_card>

<stored_paypal>

json
{
  "instrument": {
    "type": "stored_paypal_account",
    "token": "paypal_vault_token"
  },
  "payment_method_id": "paypalcommerce.paypal"
}

</stored_paypal>

</payment_instruments>

<payment_methods>

<gettingavailablemethods>

bash
GET /v3/payments/methods?order_id={order_id}

Response includes available payment methods based on:

  • Store configuration
  • Order total
  • Customer location
  • Gateway availability

</gettingavailablemethods>

<commonpaymentmethod_ids>

stripe.card
paypalcommerce.paypal
braintree.card
braintree.paypal
square.card
authorizenet.card
checkout.card
adyen.card

</commonpaymentmethod_ids>

</payment_methods>

<supported_gateways>

<compatibility>

The Payments API only works with supported gateways. Check BigCommerce documentation for current list.

Common supported gateways:

  • Stripe
  • PayPal Commerce Platform
  • Braintree
  • Square
  • Authorize.net
  • Adyen
  • Checkout.com

Not all store gateways are API-compatible. Verify before building.

</compatibility>

</supported_gateways>

<use_cases>

<headless_checkout>

Process payments from custom checkout:

typescript
async function processHeadlessPayment(orderId: number, cardDetails: CardDetails) {
  // 1. Get PAT
  const patResponse = await bigcommerceClient.post(
    '/v3/payments/access_tokens',
    { order: { id: orderId } }
  );
  const pat = patResponse.data.id;

  // 2. Process payment
  const paymentResponse = await fetch(
    `https://payments.bigcommerce.com/stores/${storeHash}/payments`,
    {
      method: 'POST',
      headers: {
        'Authorization': `PAT ${pat}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        payment: {
          instrument: {
            type: 'card',
            cardholder_name: cardDetails.name,
            number: cardDetails.number,
            expiry_month: cardDetails.expiryMonth,
            expiry_year: cardDetails.expiryYear,
            verification_value: cardDetails.cvv
          },
          payment_method_id: 'stripe.card'
        }
      })
    }
  );

  return paymentResponse.json();
}

</headless_checkout>

<recurring_billing>

For subscriptions:

  1. Store customer's card (use gateway's vaulting)
  2. Create orders per
// source originale publique
qdhenry/Claude-Command-Suite
/.claude/skills/bigcommerce-api/references/payments-api.md
Licence : Licence non indiquée. Consultez le dépôt avant toute réutilisation.
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.
// installer ce skill
Collez cette commande dans votre terminal à la racine de votre projet :
mkdir -p .claude/commands && curl -o ".claude/commands/payments-api.md" "https://raw.githubusercontent.com/qdhenry/Claude-Command-Suite/main/.claude/skills/bigcommerce-api/references/payments-api.md"
Ensuite dans Claude Code, tapez /payments-api pour l'activer.
open_in_newVoir la source originale
// sauvegarder
Sauvegarde disponible après connexion.
loginSe connecter pour sauvegarder
// informations
Créateurqdhenry
Étoiles 1.3k
Mis à jour1 mars 2026
Format.md
AccèsGratuit
// similaires

Skills Déploiement et infra

Voir toutarrow_forward