Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/payflex:payflex-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Payflex Merchant Orders API
description: REST API for integrating Payflex Buy Now Pay Later (BNPL) installment payments into e-commerce platforms.
version: 1.0.0
contact:
name: Payflex Merchant Support
email: merchants@payflex.co.za
url: https://payflex.co.za/support/
termsOfService: https://payflex.co.za/terms-conditions/
license:
name: Proprietary
url: https://payflex.co.za/terms-conditions/
servers:
- url: https://api.payflex.co.za
description: Production
- url: https://api.uat.payflex.co.za
description: Sandbox (UAT)
security:
- bearerAuth: []
tags:
- name: Orders
description: Create and manage BNPL payment orders
paths:
/order/productSelect:
post:
tags:
- Orders
summary: Create a new BNPL order
description: Create a new Payflex installment payment order. Returns a redirectUrl for the consumer to complete the payment flow on the Payflex hosted checkout, as well as an orderId and token for order tracking. Merchants must supply consumer details, billing and shipping addresses, line items, total amount, and redirect URLs for confirmed and cancelled states.
operationId: createOrder
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
example:
amount: '299.99'
consumer:
phoneNumber: '+27821234567'
givenNames: Jane
surname: Smith
email: jane.smith@example.com
billing:
addressLine1: 12 Main Street
addressLine2: Apt 3
suburb: Cape Town
postcode: '8001'
shipping:
addressLine1: 12 Main Street
addressLine2: Apt 3
suburb: Cape Town
postcode: '8001'
description: Order from Example Store
items:
- name: Blue T-Shirt
sku: SKU-001
quantity: '2'
price: '99.99'
merchant:
redirectConfirmUrl: https://example.com/checkout/confirm?status=confirmed
redirectCancelUrl: https://example.com/checkout/cancel?status=cancelled
merchantReference: '12345'
taxAmount: 0
shippingAmount: 0
merchantSystemInformation:
plugin_version: 2.7.0
php_version: 8.1.0
ecommerce_platform: WooCommerce 8.0
total_plugin_modules: '25'
active_plugin_modules: '12'
responses:
'200':
description: Order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderResponse'
'400':
description: Invalid request payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized — invalid or missing access token
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/order/{orderId}:
get:
tags:
- Orders
summary: Retrieve order status
description: 'Retrieve the current status and details of a Payflex order by its orderId. Possible orderStatus values include: Created, Initiated, Approved, Declined, Abandoned, Cancelled.'
operationId: getOrder
parameters:
- name: orderId
in: path
required: true
schema:
type: string
description: The Payflex-issued order identifier
example: ord_abc123xyz
responses:
'200':
description: Order details retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/OrderStatusResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Order not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: object
properties:
addressLine1:
type: string
description: Street address line 1
example: 12 Main Street
addressLine2:
type: string
description: Street address line 2 (apartment, suite, etc.)
example: Apt 3
suburb:
type: string
description: Suburb or city
example: Cape Town
postcode:
type: string
description: Postal code
example: '8001'
OrderStatus:
type: string
enum:
- Created
- Initiated
- Approved
- Declined
- Abandoned
- Cancelled
description: 'Current status of the Payflex order: - Created: Order created, consumer not yet started checkout - Initiated: Consumer has started the checkout process - Approved: Payment approved, funds will be settled - Declined: Payment declined - Abandoned: Consumer did not complete the checkout - Cancelled: Order was cancelled
'
OrderItem:
type: object
required:
- name
- quantity
- price
properties:
name:
type: string
description: Product name
example: Blue T-Shirt
sku:
type: string
description: Product SKU
example: SKU-001
quantity:
type: string
description: Quantity ordered (as string)
example: '2'
price:
type: string
description: Unit price (as string with two decimal places)
example: '99.99'
OrderStatusResponse:
type: object
properties:
orderId:
type: string
description: Payflex-issued order identifier
example: ord_abc123xyz
orderStatus:
$ref: '#/components/schemas/OrderStatus'
merchantReference:
type: string
description: Merchant's own order reference
example: '12345'
amount:
type: number
format: float
description: Order total amount
example: 299.99
consumer:
$ref: '#/components/schemas/Consumer'
CreateOrderResponse:
type: object
properties:
orderId:
type: string
description: Payflex-issued order identifier
example: ord_abc123xyz
token:
type: string
description: Order token for status tracking
example: tok_xyz789abc
redirectUrl:
type: string
format: uri
description: URL to redirect the consumer to complete the Payflex checkout
example: https://checkout.payflex.co.za/order/ord_abc123xyz
message:
type: string
description: Error or informational message (on failure)
example: ''
Consumer:
type: object
required:
- phoneNumber
- givenNames
- surname
- email
properties:
phoneNumber:
type: string
description: Consumer's phone number (including country code)
example: '+27821234567'
givenNames:
type: string
description: Consumer's first name(s)
example: Jane
surname:
type: string
description: Consumer's last name
example: Smith
email:
type: string
format: email
description: Consumer's email address
example: jane.smith@example.com
ErrorResponse:
type: object
properties:
errorCode:
type: string
description: Machine-readable error code
example: UNAUTHORIZED
message:
type: string
description: Human-readable error description
example: Access token is missing or invalid
CreateOrderRequest:
type: object
required:
- amount
- consumer
- merchant
- merchantReference
properties:
amount:
type: string
description: Total order amount formatted to two decimal places
example: '299.99'
consumer:
$ref: '#/components/schemas/Consumer'
billing:
$ref: '#/components/schemas/Address'
shipping:
$ref: '#/components/schemas/Address'
description:
type: string
description: Order description
example: Order from Example Store
items:
type: array
items:
$ref: '#/components/schemas/OrderItem'
description: Line items in the order
merchant:
$ref: '#/components/schemas/MerchantRedirects'
merchantReference:
type: string
description: Merchant's own order reference number
example: '12345'
taxAmount:
type: number
format: float
description: Tax amount included in the order total
example: 0
shippingAmount:
type: number
format: float
description: Shipping amount included in the order total
example: 0
merchantSystemInformation:
$ref: '#/components/schemas/MerchantSystemInformation'
MerchantSystemInformation:
type: object
properties:
plugin_version:
type: string
description: Integration plugin version
example: 2.7.0
php_version:
type: string
description: PHP version (for PHP-based integrations)
example: 8.1.0
ecommerce_platform:
type: string
description: E-commerce platform name and version
example: WooCommerce 8.0
total_plugin_modules:
type: string
description: Total number of installed modules/plugins
example: '25'
active_plugin_modules:
type: string
description: Number of active modules/plugins
example: '12'
MerchantRedirects:
type: object
required:
- redirectConfirmUrl
- redirectCancelUrl
properties:
redirectConfirmUrl:
type: string
format: uri
description: URL to redirect the consumer after a successful payment
example: https://example.com/checkout/confirm?status=confirmed
redirectCancelUrl:
type: string
format: uri
description: URL to redirect the consumer after a cancelled payment
example: https://example.com/checkout/cancel?status=cancelled
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'OAuth2 Bearer token obtained from the /auth/merchant endpoint using the client_credentials grant. Tokens expire and should be refreshed automatically before expiry.
'
externalDocs:
description: Payflex Developer Documentation
url: https://docs.payflex.co.za/