InstantTransfer
  1. CoreFy API
InstantTransfer
  • PayStar API Documentation
    • Introduction
    • Authorization Bearer
    • Sandbox
    • Callbacks
    • Glossary
    • Dictionarys
      • Currencys
      • Telecom operators
      • Bank names
    • Deposit direct (Merch)
      • Create | Deposit order
      • Check status | Deposit order
    • Deposit reverse (Gateway)
      • Create | Reverse deposit order
      • Check status | Deposit order
    • Withdrawal direct (Merch)
      • Create | Withdrawal order
      • Check status | Withdrawal order
    • Balance
      • GET Merchant balance
  • Armax API
    • POST Armax Order
      POST
  • Butler API Bridge
    • Authorization Bearer
    • Withdrawal direct | PDO API Bridge
      • Check status | Withdrawal order
      • Create | Withdrawal Order
    • PSP Deposit Order
      • PSP Deposit Order
      • PSP Deposit Order status
    • Merch Deposit Order
      • Merch Deposit Order
      • Merch Deposit Order status
  • CoreFy API
    • Withdrawal Order
      POST
    • Payment Order
      POST
  • PayNetEasy API Bridg
    • Introduсtion
    • Autorization
    • Glossary
    • POST order
      POST
    • POST Status order
      POST
  1. CoreFy API

Payment Order

Developing
POST
/payment-invoices

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
  "data": {
    "type": "payment-invoices",
    "attributes": {
      "reference_id": "12345678-1234-1234-1234-123456789012",
      "description": "Transaction 123456",
      "currency": "USD",
      "amount": 100.00,
      "service": "payment_card_usd_hpp",
      "return_url": "https://example.com/payment/return?id=12345678-1234-1234-1234-123456789012",
      "return_urls": {
        "success": "https://example.com/payment/success",
        "pending": "https://example.com/payment/pending?id=12345678-1234-1234-1234-123456789012",
        "fail": "https://example.com/payment/fail"
      },
      "callback_url": "https://webhook.example.com/payment/12345678-1234-1234-1234-123456789012",
      "customer": {
        "reference_id": "12345678-1234-1234-1234-123456789012",
        "name": "JOHN DOE",
        "email": "johndoe@example.com"
      }
    }
  },
  "Metadata": {
    "merchant_url": ""
  }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/payment-invoices' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "data": {
    "type": "payment-invoices",
    "attributes": {
      "reference_id": "12345678-1234-1234-1234-123456789012",
      "description": "Transaction 123456",
      "currency": "USD",
      "amount": 100.00,
      "service": "payment_card_usd_hpp",
      "return_url": "https://example.com/payment/return?id=12345678-1234-1234-1234-123456789012",
      "return_urls": {
        "success": "https://example.com/payment/success",
        "pending": "https://example.com/payment/pending?id=12345678-1234-1234-1234-123456789012",
        "fail": "https://example.com/payment/fail"
      },
      "callback_url": "https://webhook.example.com/payment/12345678-1234-1234-1234-123456789012",
      "customer": {
        "reference_id": "12345678-1234-1234-1234-123456789012",
        "name": "JOHN DOE",
        "email": "johndoe@example.com"
      }
    }
  },
  "Metadata": {
    "merchant_url": ""
  }
}'

Responses

🟢201Created
application/json
Body

Example
{
  "data": {
    "type": "payment-invoices",
    "id": "cpi_12345678AbCdEfGh",
    "attributes": {
      "status": "process_pending",
      "resolution": "ok",
      "moderation_required": false,
      "amount": 100.00,
      "payment_amount": 100.00,
      "currency": "USD",
      "service_amount": null,
      "payment_service_amount": null,
      "exchange_rate": null,
      "service_currency": "USD",
      "reference_id": "12345678-1234-1234-1234-123456789012",
      "test_mode": false,
      "fee": 5,
      "deposit": 95.00,
      "processed": null,
      "processed_amount": null,
      "refunded_amount": null,
      "refunded_fee": null,
      "processed_fee": null,
      "processed_deposit": null,
      "metadata": [],
      "flow_data": {
        "action": "https://checkout.example.com/hpp/1234abcd",
        "method": "GET",
        "params": [],
        "metadata": {
          "sid": "1234abcd",
          "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWQiOiIxMjM0YWJjZCIsImV4cGlyZXMiOm51bGwsImV4cCI6MTcyMzMyMjI1MH0.Ata1Ihq_CxzPRaQjjOmMGZG9AsRVQOCrnapXaYhwLA8"
        }
      },
      "flow": "hpp",
      "payment_flow": "charge",
      "created": 1723318650,
      "updated": 1723318651,
      "payload": null,
      "description": "Transaction 123456",
      "descriptor": null,
      "callback_url": "https://webhook.example.com/payment/12345678-1234-1234-1234-123456789012",
      "return_url": "https://example.com/return?id=12345678-1234-1234-1234-123456789012",
      "return_urls": {
        "fail": "https://example.com/callback/fail",
        "pending": "https://example.com/return?id=12345678-1234-1234-1234-123456789012",
        "success": "https://example.com/callback/success"
      },
      "original_data": [],
      "rrn": null,
      "arn": null,
      "approval_code": null,
      "reserved_amount": null,
      "reserve_expires": null,
      "unreserved": null,
      "source": "merchant_api",
      "callback_logs": [],
      "charged_back_amount": null,
      "resolution_message": null,
      "hpp_url": "https://capi.example.com/redirect/hpp/?cpi=cpi_12345678AbCdEfGh",
      "refunds": [],
      "reserves": [],
      "reserve_options": null,
      "processed_unreserve": null,
      "processed_reserve_cancel": null,
      "reserve_cancelled": null
    },
    "relationships": {
      "payment-service": {
        "data": {
          "type": "payment-services",
          "id": "payment_card_usd_hpp"
        }
      },
      "payment-method": {
        "data": {
          "type": "payment-methods",
          "id": "payment_card"
        }
      },
      "customer": {
        "data": {
         ​⬤
Modified at 2024-12-12 13:18:26
Previous
Withdrawal Order
Next
PayNetEasy API Bridg
Built with