### Create Card Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Create a new card for a cardholder and set its initial spending limit. ```APIDOC ## POST /cards/ ### Description Creates a new card for a cardholder. The `spendLimit` field within the request body sets the initial spending capacity for the card upon creation. This is a required field when using the Standard Authorization model. ### Method POST ### Endpoint /cards/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **spendLimit** (object) - Required. Represents the initial total maximum spending power of the card. - **amount** (number) - The amount to set as the spend limit. - **currency** (string) - The currency of the spend limit (e.g., 'USD'). ### Request Example ```json { "spendLimit": { "amount": 500.00, "currency": "USD" } } ``` ### Response #### Success Response (200) - **cardId** (string) - The unique identifier for the newly created card. - **spendLimit** (object) - The spend limit object set during card creation. - **amount** (number) - The initial spending limit amount. - **currency** (string) - The currency of the spend limit. #### Response Example ```json { "cardId": "card_abc123", "spendLimit": { "amount": 500.00, "currency": "USD" } } ``` ``` -------------------------------- ### Select Environment Source: https://reap.readme.io/reference/send-request Specifies the base URL for interacting with the Reap Card Issuing API sandbox environment. ```APIDOC ## Select Environment ### Description Use the following base URL to make requests to the sandbox environment. ### Method Not Applicable (Base URL configuration) ### Endpoint Not Applicable (Base URL configuration) ### Parameters #### Base URL - **URL** (string) - `https://sandbox.api.caas.reap.global` ``` -------------------------------- ### Get Card Balance History Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Retrieve the complete balance history for a specific card. ```APIDOC ## GET /cards/{cardId}/balance-history ### Description Fetches the complete transaction history and balance changes for a specific card, providing a detailed overview of its financial activity. ### Method GET ### Endpoint /cards/{cardId}/balance-history ### Parameters #### Path Parameters - **cardId** (string) - Required - The unique identifier of the card whose balance history is requested. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **cardId** (string) - The identifier of the card. - **balanceHistory** (array) - A list of balance adjustment events. - **timestamp** (string) - The date and time of the balance change. - **type** (string) - The type of balance event (e.g., 'initial_spend_limit', 'credit_adjustment'). - **amount** (number) - The amount of the balance change. - **currency** (string) - The currency of the balance change. - **availableCredit** (object) - The card's available credit after the event. - **amount** (number) - The available credit amount. - **currency** (string) - The currency of the available credit. #### Response Example ```json { "cardId": "card_abc123", "balanceHistory": [ { "timestamp": "2023-10-27T10:00:00Z", "type": "initial_spend_limit", "amount": 500.00, "currency": "USD", "availableCredit": { "amount": 500.00, "currency": "USD" } }, { "timestamp": "2023-10-27T11:30:00Z", "type": "credit_adjustment", "amount": 100.00, "currency": "USD", "availableCredit": { "amount": 600.00, "currency": "USD" } } ] } ``` ``` -------------------------------- ### Specify Sandbox Environment with cURL Source: https://reap.readme.io/reference/send-request Shows how to specify the sandbox environment URL for API requests using cURL. ```cURL https://sandbox.api.caas.reap.global ``` -------------------------------- ### POST /webhooks - Subscribe to Webhooks Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup This endpoint allows you to subscribe to Reap's webhooks to receive important transaction-related notifications. Subscription is required for your card program to go live. ```APIDOC ## POST /webhooks ### Description Subscribes to Reap's webhooks to receive transaction-related notifications. This is a mandatory step before a card program can go live. ### Method POST ### Endpoint /webhooks ### Parameters #### Request Body * **url** (string) - Required - The URL where webhooks will be sent. ### Request Example { "url": "https://your-callback-url.com/webhook" } ### Response #### Success Response (200) * **message** (string) - Confirmation message indicating successful subscription. #### Response Example { "message": "Successfully subscribed to webhooks." } ``` -------------------------------- ### Get Card Balance History (API) Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Retrieves the complete balance history for a specific card. This helps in tracking balance changes and ensuring the card is ready for transactions. ```bash GET /cards/{cardId}/balance-history ``` -------------------------------- ### GET /account/balance Source: https://reap.readme.io/reference/send-request Retrieves the current balance of the account within the Reap Card Issuing API sandbox. ```APIDOC ## GET /account/balance ### Description Retrieves the account balance from the Reap Card Issuing API sandbox. ### Method GET ### Endpoint `/account/balance` ### Parameters #### Request Header - **x-reap-api-key** (string) - Required - Your unique API key for authentication. - **Accept-Version** (string) - Required - Specifies the API version, e.g., `v1.0`. - **accept** (string) - Required - Specifies the expected response format, e.g., `application/json`. ``` -------------------------------- ### Subscribe to Reap Webhooks using POST /webhooks Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup This code snippet demonstrates how to subscribe to Reap's transaction-related webhooks using the POST /webhooks API endpoint. Ensure this subscription is completed before your card program can go live. ```http POST /webhooks ``` -------------------------------- ### Get Account Balance Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Retrieve the total available balance for your card program, representing the spending capability of all cards. ```APIDOC ## GET /account/balance ### Description Retrieves the total available balance for the card program, which dictates the overall spending capability across all issued cards. ### Method GET ### Endpoint /account/balance ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **availableBalance** (number) - The total available balance of the card program. #### Response Example ```json { "availableBalance": 10000.00 } ``` ``` -------------------------------- ### Authenticate API Request Source: https://reap.readme.io/reference/send-request All API requests must include your API key in the header for authentication. ```APIDOC ## Authenticate API Request ### Description Include your API key in the header of each request. ### Method Not Applicable (Header configuration) ### Endpoint Not Applicable (Header configuration) ### Parameters #### Request Header - **x-reap-api-key** (string) - Required - Your unique API key for authentication. ``` -------------------------------- ### Authenticate API Request with cURL Source: https://reap.readme.io/reference/send-request Demonstrates how to include the API key in the header of a cURL request for authentication with the Reap API. ```cURL curl --request GET \ --url https://sandbox.api.caas.reap.global/account/balance \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' \ --header 'x-reap-api-key: YOUR_API_KEY' ``` -------------------------------- ### Configure Merchant Category Code (MCC) Padding Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Set up rules for Merchant Category Codes (MCCs) to manage transaction authorization behavior. ```APIDOC ## POST /account/mcc-padding ### Description Configures padding rules for specific Merchant Category Codes (MCCs). This allows for granular control over transaction authorizations based on the merchant's industry type. ### Method POST ### Endpoint /account/mcc-padding ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **mcc** (string) - Required. The Merchant Category Code to configure. - **paddingRule** (string) - Required. The rule to apply for this MCC (e.g., 'allow', 'block', 'require_extra_auth'). ### Request Example ```json { "mcc": "5812", "paddingRule": "allow" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the MCC padding rule has been set. #### Response Example ```json { "message": "MCC 5812 padding rule set to 'allow'." } ``` ``` -------------------------------- ### Get MCC Padding Config (Node.js) Source: https://reap.readme.io/reference/get_account-mcc-padding Provides a Node.js example for retrieving MCC padding configurations. It utilizes the 'node-fetch' library to make a GET request with specified headers. ```javascript const fetch = require('node-fetch'); const options = { method: 'GET', headers: { 'Accept-Version': 'v1.0', 'accept': 'application/json' } }; fetch('https://sandbox.api.caas.reap.global/account/mcc-padding?limit=10', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### Update Card Spend Control Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Configure or update spending limits for a specific card. ```APIDOC ## PUT /cards/{cardId}/spend-control ### Description Allows setting or modifying specific spending controls at the individual card level, such as transaction limits or daily spending caps. ### Method PUT ### Endpoint /cards/{cardId}/spend-control ### Parameters #### Path Parameters - **cardId** (string) - Required - The unique identifier of the card for which to configure spend controls. #### Query Parameters None #### Request Body - **spendControls** (object) - An object containing various spend control parameters. - **transactionLimit** (object) - Optional. Sets a limit per transaction. - **amount** (number) - The maximum amount allowed per transaction. - **currency** (string) - The currency of the transaction limit. - **dailyLimit** (object) - Optional. Sets a cumulative spending limit for a 24-hour period. - **amount** (number) - The maximum amount allowed per day. - **currency** (string) - The currency of the daily limit. ### Request Example ```json { "spendControls": { "transactionLimit": { "amount": 100.00, "currency": "USD" }, "dailyLimit": { "amount": 500.00, "currency": "USD" } } } ``` ### Response #### Success Response (200) - **cardId** (string) - The identifier of the card with updated spend controls. - **spendControls** (object) - The updated spend control configuration. #### Response Example ```json { "cardId": "card_abc123", "spendControls": { "transactionLimit": { "amount": 100.00, "currency": "USD" }, "dailyLimit": { "amount": 500.00, "currency": "USD" } } } ``` ``` -------------------------------- ### Create Card with Top-Up Wallet (Example) Source: https://reap.readme.io/reference/post_cards This example illustrates creating a card with the top-up wallet feature enabled, typically for cardholder-managed funding. It includes the necessary `topUpWallet` object. ```json { "cardType": "virtual", "spendLimit": 75.00, "customerType": "Consumer", "preferredCardName": "Jane Smith", "meta": { "clientId": "client_456", "customerType": "Individual", "phoneNumber": "+1122334455" }, "topUpWallet": { "enabled": true } } ``` -------------------------------- ### Transaction Webhook Example Source: https://reap.readme.io/docs/fx-fee-configuration-and-reconciliation This example demonstrates the structure of a transaction webhook, including fee details and the total bill amount. ```APIDOC ## Transaction Webhook Example ### Description This webhook provides details about a transaction, including applied FX and ATM fees, and the final amount charged to the cardholder. ### Method POST ### Endpoint /webhooks/transaction ### Request Body - **data** (object) - Contains transaction-specific information. - **id** (string) - Unique identifier for the transaction. - **fees** (object) - Fee breakdown for the transaction. - **fxFees** (string) - Total FX fees charged. - **atmFees** (string) - Total ATM fees charged. - **billAmount** (integer) - The total amount charged to the cardholder, including fees. - **status** (string) - The current status of the transaction (e.g., "PENDING"). - **eventName** (string) - The name of the event (e.g., "authorization"). - **eventType** (string) - The type of event (e.g., "transaction"). ### Request Example ```json { "data": { "id": "tid_eqGbnEHLC9", "fees": { "fxFees": "5.00", "atmFees": "0.00" }, "billAmount": 105, "status": "PENDING", ... }, "eventName": "authorization", "eventType": "transaction" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation of webhook reception. ``` -------------------------------- ### Get MCC Padding Config (Python) Source: https://reap.readme.io/reference/get_account-mcc-padding Illustrates fetching MCC padding configurations using Python's 'requests' library. The code demonstrates setting headers and making a GET request to the API. ```python import requests url = "https://sandbox.api.caas.reap.global/account/mcc-padding" params = { "limit": "10" } headers = { "Accept-Version": "v1.0", "accept": "application/json" } response = requests.request("GET", url, params=params, headers=headers) print(response.text) ``` -------------------------------- ### Unblock Card API Request Examples Source: https://reap.readme.io/reference/put_cards-cardid-unblock This section provides example code snippets for unblocking a card using various programming languages. These examples illustrate how to make the PUT request to the Reap API. ```node /* Node.js example would go here */ ``` ```ruby /* Ruby example would go here */ ``` ```php /* PHP example would go here */ ``` ```python /* Python example would go here */ ``` -------------------------------- ### Example Authorization Response - Reap Source: https://reap.readme.io/docs/real-time-authorization-deep-dive-authorization-flow This example demonstrates the expected HTTPS response format when your server approves or declines a transaction authorization request from Reap. The response should be sent within 1.6 seconds. ```json { "decision": "approve", "reasonCode": "00" } ``` -------------------------------- ### Environment Switching Source: https://reap.readme.io/reference/api-basics Information on how to switch between the sandbox and production environments by updating the base URL and using the appropriate API key. ```APIDOC ## Environment Switching ### Description This section explains how to transition between the Reap API's sandbox and production environments. It clarifies which base URLs and API keys to use for each environment. ### Method N/A (Informational) ### Endpoint N/A (Informational) ### Environment Details - **Sandbox Base URL**: `https://sandbox.api.caas.reap.global` - **Production Base URL**: `https://prod.api.caas.reap.global` ### Notes - Ensure you use the correct API key corresponding to the environment you are targeting. - Connecting multiple internal environments (dev, staging) to Reap's sandbox and production is supported by using multiple Reap accounts. ``` -------------------------------- ### Get Master Account Balance (PHP) Source: https://reap.readme.io/reference/get_account-balance PHP implementation to get the master account balance via the Reap API. This example demonstrates using cURL to make the HTTP GET request. ```php $ch = curl_init('https://sandbox.api.caas.reap.global/account/balance'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer YOUR_API_KEY' )); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo $response; } curl_close($ch); ``` -------------------------------- ### Get Card Orders cURL Request Source: https://reap.readme.io/reference/get_cards-cardid-orders Example cURL command to retrieve card orders. It specifies the GET method, the API endpoint, and necessary headers for authentication and content negotiation. ```shell curl --request GET \ --url https://sandbox.api.caas.reap.global/cards/cardId/orders \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' ``` -------------------------------- ### Initiate Bulk Shipment Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Initiates a bulk order for the production and shipment of multiple physical cards. Requires a list of card IDs and a card design ID. ```APIDOC ## POST /cards/bulk-ship ### Description Initiates a bulk shipment for a batch of physical cards. This endpoint is used both for initial bulk shipments and for adding more cards to an existing shipment (FlexAdd). ### Method POST ### Endpoint /cards/bulk-ship ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **cardIds** (array of strings) - Required - A list of `cardId` values for the cards to be included in the shipment. - **cardDesignId** (string) - Required - The `cardDesignId` to be used for all cards in this shipment batch. - **bulkShipId** (string) - Optional - If provided, this adds the specified `cardIds` to an existing bulk shipment. ### Request Example (Initial Bulk Shipment) ```json { "cardIds": [ "37437a01-a64d-405a-9269-9eebdb0cdc1d", "37437a01-a64d-405a-9269-9eebdb0cdc2e", "37437a01-a64d-405a-9269-9eebdb0cdc3f" ], "cardDesignId": "0028d9f4-8593-45fa-9511-6867fdcb6e93" } ``` ### Request Example (Adding to Existing Bulk Shipment - FlexAdd) ```json { "cardIds": [ "37437a01-a64d-405a-9269-9eebdb0cdc4g", "37437a01-a64d-405a-9269-9eebdb0cdc5h" ], "cardDesignId": "0028d9f4-8593-45fa-9511-6867fdcb6e93", "bulkShipId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **bulkShipId** (string) - The unique identifier for the bulk shipment. - **successCount** (integer) - The number of cards successfully added to the shipment. - **remainingSlots** (integer) - The number of remaining slots available in the shipment. - **cutoffDate** (string) - The cutoff date for the current shipment batch. #### Response Example ```json { "bulkShipId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "successCount": 10, "remainingSlots": 90, "cutoffDate": "2024-11-08" } ``` ``` -------------------------------- ### Get Master Account Balance (Node.js) Source: https://reap.readme.io/reference/get_account-balance Node.js example to fetch the master account balance from the Reap API. Requires setting up an HTTP client to make the GET request to the specified endpoint. ```javascript // Example using a fetch-like library fetch('https://sandbox.api.caas.reap.global/account/balance', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### Get Account Balance Endpoint Source: https://reap.readme.io/docs/standard-authorization-authorization-flow This example demonstrates how to use the GET /account/balance endpoint to check the card program's master account balance. This is useful for verifying overall program funds. ```bash GET account/balance ``` -------------------------------- ### Ship Physical Card Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Initiates the shipping process for a physical card. This endpoint is referenced but not detailed in the provided text. ```APIDOC ## POST /shipments/physical-cards ### Description Initiates the shipment of a physical card. This endpoint is crucial for the end-to-end physical card production and shipping process. ### Method POST ### Endpoint /shipments/physical-cards ### Parameters *Details for this endpoint are available in the API Reference documentation.* ### Response *Details for this endpoint are available in the API Reference documentation.* ### Error Handling *Details for this endpoint are available in the API Reference documentation.* ``` -------------------------------- ### Get Card Credit Endpoint Source: https://reap.readme.io/docs/standard-authorization-authorization-flow This example shows how to use the GET /card/{cardId}/credit endpoint to verify a card's available credit. It's used to check if sufficient credit is available for a transaction. ```bash GET card/{cardId}/credit ``` -------------------------------- ### Create Virtual Card (Example) Source: https://reap.readme.io/reference/post_cards This example demonstrates how to create a virtual card using the Reap API. It includes essential parameters such as card type, spend limit, customer type, and metadata. ```json { "cardType": "virtual", "spendLimit": 100.50, "customerType": "Consumer", "preferredCardName": "John Doe", "meta": { "clientId": "client_123", "customerType": "Individual", "phoneNumber": "+1234567890" } } ``` -------------------------------- ### Create a Card Source: https://reap.readme.io/docs/end-to-end-physical-card-production-and-shipping-process Creates a physical card, enabling personalization and shipping in subsequent steps. The `cardType` must be set to `Physical`. ```APIDOC ## POST /card ### Description Creates a card. Ensure `cardType` is set to `Physical` to enable personalization and shipping. ### Method POST ### Endpoint /card ### Parameters #### Request Body - **cardType** (string) - Required - Specifies the type of card to be created (e.g., 'Physical'). ### Request Example ```json { "cardType": "Physical" } ``` ### Response #### Success Response (200) - **cardId** (string) - The unique identifier for the created card. - **cardType** (string) - The type of card created. #### Response Example ```json { "cardId": "some-card-id", "cardType": "Physical" } ``` ``` -------------------------------- ### Retrieve Declined Transaction with GET /transactions/{transactionid} Source: https://reap.readme.io/docs/card-status If a transaction was declined due to an inactive card, retrieve the details using the GET /transactions/{transactionid} endpoint. The 'decline_reason' field will specify that the card status was not active. ```http GET /transactions/{transactionid} ``` -------------------------------- ### Accessing Sandbox Environment Source: https://reap.readme.io/reference/test-environment This section explains how to access the Reap API's sandbox environment for testing purposes. It highlights the importance of using this environment to ensure correct implementation and avoid production issues. It also provides an example of how to set up your API key. ```APIDOC ## Accessing Sandbox Environment ### Description Use the Reap API test environment to ensure your implementation functions correctly before going live. This helps avoid unexpected issues in production. ### Method POST ### Endpoint https://sandbox.api.caas.reap.global/cards ### Parameters #### Header Parameters - **x-reap-api-key** (string) - Required - Your API key for authentication. - **accept** (string) - Required - Specifies the expected response format, typically 'application/json'. - **content-type** (string) - Required - Specifies the format of the request body, typically 'application/json'. ### Request Example ```json { "x-reap-api-key": "YOUR_API_KEY" } ``` ### Response #### Success Response (200) This endpoint does not specify a success response body structure in the provided documentation. However, it is expected to return a success status upon successful request. #### Response Example (No specific example provided in the documentation. Assume a standard success response, e.g., an empty body or a confirmation message.) ### Notes - IP Whitelisting is not required for the Sandbox environment. - Only use the sandbox base URL for test API calls on the documentation page. ``` -------------------------------- ### Create Card Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Allows the creation of new cards, with the option to specify a card design ID or leave it empty for later assignment. ```APIDOC ## POST /cards ### Description Creates a new card. This endpoint can be used to create cards without an initial card design ID, which can be updated later. ### Method POST ### Endpoint /cards ### Parameters #### Request Body - **cardType** (string) - Required - Specifies the type of card, e.g., "Physical" or "Virtual". - **cardDesignId** (string) - Optional - The ID of the card design to be associated with the card. If not provided, it can be updated later. ### Request Example { "cardType": "Physical", "cardDesignId": "" } ### Response #### Success Response (200) - **cardId** (string) - The unique identifier for the newly created card. #### Response Example { "cardId": "card_abc123" } ### Error Handling - `400 Bad Request`: If required fields are missing or invalid. - `409 Conflict`: If a card with the same unique identifier already exists. ``` -------------------------------- ### Retrieve Card Balance History (GET) Source: https://reap.readme.io/reference/get_cards-cardid-balance-history This snippet shows how to make a GET request to the Card Balance History endpoint to retrieve deposit and withdrawal records for a given card ID. It includes example path and query parameters. ```HTTP get https://sandbox.api.caas.reap.global/cards/{cardId}/balance-history ``` -------------------------------- ### Retrieve Financial Report Files via GET /files Source: https://reap.readme.io/docs/retrieve-monthly-invoice-billing-details-copy This guide explains how to retrieve different financial report files by calling the GET /files endpoint. You need to specify the file type and a date range to get a detailed breakdown of fees and transactions for reconciliation purposes. The reports include fee details, non-transactional costs, and transaction-related fees. ```HTTP GET /files?fileType={fileType}&date={date} ``` -------------------------------- ### Create Physical Card (Example) Source: https://reap.readme.io/reference/post_cards This example shows how to create a physical card using the Reap API. It includes parameters for physical card creation, such as card type, customer details, and preferred card name for printing. ```json { "cardType": "physical", "spendLimit": 500.00, "customerType": "Business", "preferredCardName": "ACME Corp", "secondaryCardName": "Admin Account", "expiryDate": "2025-12-31", "meta": { "clientId": "corp_abc", "customerType": "Business", "phoneNumber": "+1987654321" }, "cardDesign": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` -------------------------------- ### Retrieve All Card Design (Node.js, Ruby, PHP, Python) Source: https://reap.readme.io/reference/get_card-design This section provides examples for retrieving all card designs using the Reap API across multiple programming languages. Each example demonstrates the equivalent HTTP GET request with appropriate library usage. ```Node.js const https = require('https'); const options = { method: 'GET', hostname: 'sandbox.api.caas.reap.global', port: null, path: '/card-design/', headers: { 'Accept-Version': 'v1.0', 'accept': 'application/json' } }; const req = https.request(options, function (res) { const chunks = []; res.on('data', function (chunk) { chunks.push(chunk); }); res.on('end', function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); ``` ```Ruby require 'uri' require 'net/http' uri = URI.parse("https://sandbox.api.caas.reap.global/card-design/") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri.request_uri) request["Accept-Version"] = "v1.0" request["accept"] = "application/json" response = http.request(request) puts response.body ``` ```PHP "https://sandbox.api.caas.reap.global/card-design/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Accept-Version: v1.0", "accept: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #" . $err; } else { echo $response; } ``` ```Python import http.client conn = http.client.HTTPSConnection("sandbox.api.caas.reap.global") conn.request("GET", "/card-design/", headers={ "Accept-Version": "v1.0", "accept": "application/json" }) response = conn.getresponse() data = response.read() print(data.decode("utf-8")) conn.close() ``` -------------------------------- ### API Basics and Sandbox Access Source: https://reap.readme.io/reference/api-basics This section outlines how to access the Reap API sandbox environment and authenticate your requests using an API key. ```APIDOC ## API Basics and Sandbox Access ### Description This section details how to access the Reap API sandbox environment for testing card issuing integrations. It explains the importance of the sandbox for safe testing and provides instructions on how to authenticate API requests. ### Method N/A (Informational) ### Endpoint N/A (Informational) ### Parameters #### Request Headers (for Authentication) - **x-reap-api-key** (string) - Required - Your unique API key for authentication. ### Request Example (Authentication Header) ``` { "x-reap-api-key": "YOUR_API_KEY" } ``` ### Response N/A (Authentication is a prerequisite for API calls) ### Notes - Use the sandbox base URL: `https://sandbox.api.caas.reap.global` for all test calls. - IP whitelisting is not required for sandbox access. - Common sandbox limitations include simulated or unavailable features like 3DS transaction flows, physical card shipping, and Mobile Wallet provisioning. ``` -------------------------------- ### Adjust Card Credit Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Modify the credit limit of an existing card. A positive value increases the limit, and a negative value decreases it. ```APIDOC ## PUT /cards/{cardId}/credit ### Description Adjusts the available credit for a specific card. Use a positive value in the `adjustment` field to increase the card's spending limit, or a negative value to decrease it. ### Method PUT ### Endpoint /cards/{cardId}/credit ### Parameters #### Path Parameters - **cardId** (string) - Required - The unique identifier of the card to update. #### Query Parameters None #### Request Body - **adjustment** (object) - Required. Specifies the amount and currency for the credit adjustment. - **amount** (number) - The amount to adjust the credit by. Positive for increase, negative for decrease. - **currency** (string) - The currency of the adjustment (e.g., 'USD'). ### Request Example ```json { "adjustment": { "amount": 100.00, "currency": "USD" } } ``` ### Response #### Success Response (200) - **cardId** (string) - The identifier of the updated card. - **availableCredit** (object) - The updated available credit for the card. - **amount** (number) - The new available credit amount. - **currency** (string) - The currency of the available credit. #### Response Example ```json { "cardId": "card_abc123", "availableCredit": { "amount": 600.00, "currency": "USD" } } ``` ``` -------------------------------- ### Subscribe to Webhooks Source: https://reap.readme.io/docs/configuration-checklist Use the POST /webhooks endpoint to register your webhook URL for receiving real-time notifications about transaction events. ```APIDOC ## POST /webhooks ### Description Registers a webhook URL to receive real-time notifications for transaction events. ### Method POST ### Endpoint /webhooks ### Parameters #### Request Body - **webhook_url** (string) - Required - The URL to which notifications will be sent. ### Request Example { "webhook_url": "https://your-domain.com/webhook-handler" } ### Response #### Success Response (200) - **id** (string) - The unique identifier for the registered webhook. - **url** (string) - The registered webhook URL. - **created_at** (string) - The timestamp when the webhook was created. #### Response Example { "id": "wh_abc123", "url": "https://your-domain.com/webhook-handler", "created_at": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### Initiate Bulk Card Shipment Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Initiates a bulk order for the production and shipment of multiple physical cards. It requires a list of `cardId`s and the `cardDesignId`. The response provides a `bulkShipId` for tracking and a `successCount` of processed cards. ```json { "bulkShipId": "string", "successCount": 10, "remainingSlots": 90, "cutoffDate": "2024-11-08" } ``` -------------------------------- ### Retrieve all cards (cURL) Source: https://reap.readme.io/reference/get_cards Example cURL command to retrieve all cards. It specifies the GET request, the API endpoint with pagination parameters, and necessary headers for version and content type. ```Shell curl --request GET \ --url 'https://sandbox.api.caas.reap.global/cards?page=1&limit=10' \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' ``` -------------------------------- ### Simulate Crypto Top-Up (cURL) Source: https://reap.readme.io/reference/post_simulate-cardid-crypto-top-up Provides a cURL command to simulate a crypto top-up transaction. This includes setting the request URL, method, and necessary headers like Accept-Version, Accept, and Content-Type. ```Shell curl --request POST \ --url https://sandbox.api.caas.reap.global/simulate/cardID/crypto/top-up \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' \ --header 'content-type: application/json' ``` -------------------------------- ### Refund Webhook Example Source: https://reap.readme.io/docs/transaction-scenarios-refund Demonstrates the webhook payload for a refund transaction. It includes event name and status updates to reflect the refund. ```json { "eventName": "refund", "status": "VOID", "transactionId": "txn_12345" } ``` -------------------------------- ### Set Accept Header for JSON Response from Reap API Source: https://reap.readme.io/reference/get_transactions This example shows how to set the 'accept' header to 'application/json'. This header tells the Reap API that the client expects the response in JSON format. ```bash --header 'accept: application/json' ``` -------------------------------- ### Simulate Authorization Reversal Transaction (cURL) Source: https://reap.readme.io/reference/post_simulate-transactionid-reversal Demonstrates how to simulate an authorization reversal transaction using cURL. It includes the POST request to the sandbox environment, setting necessary headers like Accept-Version, accept, and content-type. ```Shell curl --request POST \ --url https://sandbox.api.caas.reap.global/simulate/transactionID/reversal \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' \ --header 'content-type: application/json' ``` -------------------------------- ### Adjust Card Credit Limit (API) Source: https://reap.readme.io/docs/standard-authorizationcard-program-setup Modifies the credit limit of an existing card. A positive value increases the limit, while a negative value decreases it. This is used for adjustments after card creation. ```bash PUT /cards/{cardId}/credit ``` -------------------------------- ### Retrieve Card Design Details Source: https://reap.readme.io/docs/end-to-end-physical-card-production-and-shipping-process Use the GET /card-design endpoint to retrieve details about an approved card design. This helps verify the cardDesignId and confirms that cardDesignsStock is true, ensuring the design is ready for personalization. The response includes the card's ID, name, and stock availability. ```json { "cardDesigns": [ { "id": "7d1445da-22c1-47d7-a365-24fb6d816038", "name": "ABC_COMPANY_BLACKCARD_USD_DESIGN", "default": true, "stock": true, } ] } ``` -------------------------------- ### Create Card Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Creates an individual physical card record. Requires a card design ID and sets the card type to 'Physical'. ```APIDOC ## POST /cards ### Description Creates a new card. For physical cards, the `cardType` must be set to `"Physical"` and a valid `cardDesignId` must be provided. ### Method POST ### Endpoint /cards ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **cardType** (string) - Required - Specifies the type of card, must be `"Physical"`. - **cardDesignId** (string) - Required - The ID of the card design to be used for the physical card. ### Request Example ```json { "cardType": "Physical", "cardDesignId": "0028d9f4-8593-45fa-9511-6867fdcb6e93" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the newly created card. #### Response Example ```json { "id": "37437a01-a64d-405a-9269-9eebdb0cdc1d" } ``` ``` -------------------------------- ### Get all transactions (HTTP GET) Source: https://reap.readme.io/reference/get_transactions This snippet shows how to retrieve a list of transactions from the Reap API. It includes the base URL and mentions the availability of query parameters for pagination and date filtering. ```HTTP get https://sandbox.api.caas.reap.global/transactions ``` -------------------------------- ### cURL GET Request for Monthly Report Source: https://reap.readme.io/reference/files This cURL command demonstrates how to make a GET request to the Reap API to retrieve a monthly report. It includes the necessary URL and headers for authentication and versioning. ```Shell curl --request GET \ --url https://sandbox.api.caas.reap.global/files/monthly \ --header 'Accept-Version: v1.0' \ --header 'accept: application/json' ``` -------------------------------- ### Create Card without Design and Update Later Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Demonstrates creating a physical card without an initial card design ID and updating it later. This approach is generally not recommended for production use as the card design ID is crucial for core functionalities like digital wallet provisioning and physical card shipping. ```HTTP POST /cards { "cardType": "Physical", "cardDesignId": null } ``` -------------------------------- ### Create Physical Card Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Creates an individual physical card record. This endpoint requires the `cardDesignId` and specifies `cardType` as 'Physical'. The response includes a unique `cardId` used for initiating production and shipment. ```json { "id": "37437a01-a64d-405a-9269-9eebdb0cdc1d" } ``` -------------------------------- ### Get MCC Padding Config (Ruby) Source: https://reap.readme.io/reference/get_account-mcc-padding Shows a Ruby implementation for retrieving MCC padding configurations. It uses the 'httparty' gem to send a GET request with appropriate headers and query parameters. ```ruby require 'httparty' url = 'https://sandbox.api.caas.reap.global/account/mcc-padding' options = { query: { limit: '10' }, headers: { 'Accept-Version' => 'v1.0', 'accept' => 'application/json' } } response = HTTParty.get(url, options) puts response.body ``` -------------------------------- ### Retrieve All Card Designs Source: https://reap.readme.io/docs/guide-to-physical-card-production-shipping Fetches a list of available card designs, which can be used to populate the `cardDesignId` when creating or updating cards. ```APIDOC ## GET /card-designs ### Description Retrieves a list of all available card designs. This is useful for obtaining `cardDesignId` values needed for card creation or updates. ### Method GET ### Endpoint /card-designs ### Parameters *No parameters required for this endpoint.* ### Response #### Success Response (200) - **cardDesigns** (array) - A list of card design objects, each containing details like `cardDesignId` and design name. #### Response Example { "cardDesigns": [ { "cardDesignId": "design_xyz789", "name": "Standard Visa Design" }, { "cardDesignId": "design_uvw456", "name": "Premium Mastercard Design" } ] } ### Error Handling - `500 Internal Server Error`: If there is an issue retrieving the card designs. ```