Scheduled Payment

The Scheduled Payment Object represents the lifecycle of a scheduled payment, encompassing its various states such as succeeded, failed, pending, and more. It serves as a comprehensive record of payments that are set to occur at a future date or on a recurring schedule. This object captures all relevant information about the payment.

For more on how to get started with scheduled payments, check out our guide on creating scheduled payments.


Scheduled Payment Model

The Scheduled Payment Model offers comprehensive details about future-dated payments scheduled within the Felloh system. This model includes key data points such as payment amounts, execution date, and links to associated entities like customers, bookings, and transactions.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the object.

  • Name
    amount
    Type
    number
    Description

    The amount of the scheduled payment.

  • Name
    booking
    Type
    object
    Description

    The booking model that the scheduled payment is linked to.

  • Name
    created_at
    Type
    datetime
    Description

    The datetime at which the scheduled payment was created within our systems.

  • Name
    currency
    Type
    string
    Description

    The currency of the transaction. See the currency model for more information.

  • Name
    customer
    Type
    object
    Description

    The customer model associated with this ecommerce session.

  • Name
    execute_after
    Type
    datetime
    Description

    The datetime at which the transaction object was created within our systems.

  • Name
    organisation
    Type
    object
    Description

    The organisation model that the transaction is linked to.

  • Name
    transaction
    Type
    object
    Description

    The compact transaction model that the charge relates to.

  • Name
    status
    Type
    string
    Description

    The status of the scheduled payment. Utilise the enums endpoint for all potential options.

<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;fa4d2473-fc9f-4273-82bc-366a33ce719c&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">50</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;booking&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;d3428360-fda6-41c3-995e-fbb0fdb69fd2&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;recurring-payment&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-10-16T13:53:14.075Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;customer&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;368b61c0-717f-4132-afb8-09b10e5a56b5&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;execute_after&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-10-16T13:53:14.067Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;organisation&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Felloh&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;transaction&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;04416b80-ffa9-4874-abc9-f608cb2910f2&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;status&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;COMPLETE&quot;</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Fetch All

This endpoint retrieves all scheduled. Scheduled payments are sorted by creation date, with the most recent scheduled payments coming first.

Parameters

  • Name
    organisationrequired
    Type
    string
    Description

    The organisation ID that you want to fetch transactions for. You can find the organisation that you have access to by using the list all organisations method.

  • Name
    keyword
    Type
    string
    Description

    A customer name, booking reference, or email address that you want to filter by.

  • Name
    skip
    Type
    integer
    Description

    Pagination offset. See pagination documentation for details.

  • Name
    take
    Type
    integer
    Description

    Number of records to return. pagination documentation for details.

  • Name
    show-child-organisations
    Type
    boolean
    Description

    Whether to also show scheduled payments for any of the requested organisation's child organisations.

Returns

Returns an array of Scheduled Payment Models

Request

POST
/agent/transactions
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">post</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  &#x27;https</span><span class="token" style="color:#d4d4d4">:</span><span class="token" style="color:#d4d4d4">/</span><span class="token" style="color:#d4d4d4">/</span><span>api</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">felloh</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">com</span><span class="token" style="color:#d4d4d4">/</span><span>payment</span><span class="token" style="color:#d4d4d4">/</span><span>scheduled</span><span class="token" style="color:#d4d4d4">-</span><span>payment</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token literal-property" style="color:#9cdcfe">organisation</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;X9876&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token literal-property" style="color:#9cdcfe">skip</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token literal-property" style="color:#9cdcfe">take</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">20</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;fa4d2473-fc9f-4273-82bc-366a33ce719c&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">50</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;d3428360-fda6-41c3-995e-fbb0fdb69fd2&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;recurring-payment&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-10-16T13:53:14.075Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;customer&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;368b61c0-717f-4132-afb8-09b10e5a56b5&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;execute_after&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-10-16T13:53:14.067Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;organisation&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Felloh&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;transaction&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;04416b80-ffa9-4874-abc9-f608cb2910f2&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;status&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;COMPLETE&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;cdd40f5c-9d82-44c2-92e3-b5d2cad364f6&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;count&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">1</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Get Cards On Booking

This endpoint retrieves all available tokens associated with a specific booking. Tokens represent saved payment methods and include details like the cardholder name, card brand, and organisation ID.

Path Parameters

  • Name
    booking_id
    Type
    UUID
    Description

    The booking ID you wish to find tokenised card details for.

Returns

Returns an array of Tokenised Card Models

Request

POST
/agent/bookings/:booking_id/update-reference
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> bookingId </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#ce9178">&#x27;d8529e8d-dbfd-41fc-bc35-71bbe91ab719&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span><span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">get</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">https://api.felloh.com/payment/booking/</span><span class="token template-string" style="color:#569cd6">${</span><span class="token template-string" style="color:#9cdcfe">bookingId</span><span class="token template-string" style="color:#569cd6">}</span><span class="token template-string" style="color:#ce9178">/available-tokens</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#4ec9b0">console</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">log</span><span class="token" style="color:#d4d4d4">(</span><span>response</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">data</span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span>
</span><span>        </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>            </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;3067549d-d3ce-4002-8d02-b10bc38af53b&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>            </span><span class="token" style="color:#9cdcfe">&quot;cardholder_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>            </span><span class="token" style="color:#9cdcfe">&quot;bin&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;43965400&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>            </span><span class="token" style="color:#9cdcfe">&quot;card_brand&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;VISA&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>            </span><span class="token" style="color:#9cdcfe">&quot;organisation_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span>
</span><span>        </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ead76d39-f561-4ed9-be8a-008454e3fc77&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Create Payment for Booking

This endpoint creates a payment for a specific booking.

Parameters

  • Name
    bookingIdrequired
    Type
    string
    Description

    The unique ID of the booking for which the payment is being created. This must be included in the URL path.

Payload

  • Name
    tokenrequired
    Type
    string
    Description

    The token representing the payment method to be used. Tokens can be retrieved using the Fetch Available Tokens for Booking endpoint.

  • Name
    amountrequired
    Type
    number
    Description

    The amount to be paid. This value should be in the smallest currency unit (e.g., cents for USD or pence for GBP).

  • Name
    date
    Type
    string
    Description

    The date and time when the payment should be executed, in ISO 8601 format. If no date is provided, then the payment will be taken immediately.

Returns

An empty object is returned upon successful payment creation.

Request

POST
/payment/booking/{bookingId}/payment
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> payload </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token literal-property" style="color:#9cdcfe">token</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;3067549d-d3ce-4002-8d02-b10bc38af53b&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token literal-property" style="color:#9cdcfe">amount</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">25</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token literal-property" style="color:#9cdcfe">date</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2025-03-29T00:00:00.000Z&quot;</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">post</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token" style="color:#ce9178">&#x27;https://api.felloh.com/payment/booking/d8529e8d-dbfd-41fc-bc35-71bbe91ab719/payment&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  payload</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#4ec9b0">console</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">log</span><span class="token" style="color:#d4d4d4">(</span><span>response</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">data</span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;011cf9dc-c2b5-4bd1-90ad-825389521a08&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

This endpoint generates an approval link for scheduled payments for a specific booking. The approval link will be emailed to your customer when this endpoint is hit.

This is an optional feature and must be enabled on the Organisation Settings Page. If not enabled, scheduled payments will be automatically approved.

Parameters

  • Name
    bookingIdrequired
    Type
    string
    Description

    The unique ID of the booking for which the approval link is being generated. This must be included in the URL path.

Returns

An empty object is returned upon the approval link being sent to the custoemr.

Request

POST
/agent/bookings/{bookingId}/approval-link
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">post</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token" style="color:#ce9178">&#x27;https://api.felloh.com/agent/bookings/d8529e8d-dbfd-41fc-bc35-71bbe91ab719/approval-link&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#4ec9b0">console</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">log</span><span class="token" style="color:#d4d4d4">(</span><span>response</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">data</span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;12345678-90ab-cdef-1234-567890abcdef&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Cancel Scheduled Payment

This endpoint cancels a scheduled payment by its unique ID. Once canceled, the payment will no longer be executed.

Parameters

  • Name
    paymentIdrequired
    Type
    string
    Description

    The unique ID of the scheduled payment to cancel. This must be included in the URL path.

Returns

An empty object is returned upon successful cancellation.

Request

DELETE
/payment/scheduled-payment/{paymentId}
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">delete</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token" style="color:#ce9178">&#x27;https://api.felloh.com/payment/scheduled-payment/da08e745-2382-4619-bbb2-c85982672557&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#4ec9b0">console</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">log</span><span class="token" style="color:#d4d4d4">(</span><span>response</span><span class="token" style="color:#d4d4d4">.</span><span class="token property-access">data</span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;87654321-fedc-ba09-8765-432109abcdef&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>