Introduction
The API was designed for integration with the OYF Payment Gateway. The bird's eye view on main API integration business-process is straight-forward:
- You have to get the Supported currency, Which you have already linked your wallet with the OYF portal.
- After that make payment request using currency uuid and other detail
- Check Order Status
In cases of prolongation, cancellation, or other order parameter change you have to make a new request about its new value by corresponding API request.
Basic concepts
Authentication
All requests must be authenticated.
To get a test account with API token - please - contact the dev@oyf.io or contact the sales team.
Permissions
Privileges are an internal mechanism for restricting user actions. The set of privileges is given to the user during account creation and determines the actions that he is allowed to do. In an integration context, you will only encounter privileges when you get "permission denied" error.
Requests
All requests should be made using the HTTPS protocol so that traffic is encrypted.
When passing parameters in a Post request, parameters must be passed as a form object containing attribute names and values as key-value pairs.
Responses
All the responses will be JSON structures (Except file downloading). The API aim to conform to the Restful concept. All meaningful information is passed in the BODY of response. API only supports GET and Post requests.
Getting the Currency
CURL Request
Response
Make Payment (Order)
CURL Request
Form Object
Key
Value
Description
currency_id
cd3b5f06-7a00-4513-bbd3-ea8118f1326a
Required
name
Test User
Optional / Nullable
test@oyf.io
Optional / Nullable
phone
+(508) 646-2869
Optional / Nullable
address
test address
Optional / Nullable
issued_date
2023-04-06
Required
inv_description
Testing Invoice descriotions
Optional / Nullable
invoice_type
S
S => Sale , R => Recursion (Required)
subtotal
85
Optional / Nullable
subtotal_discount
0
Optional / Nullable
vat_tax
5
Optional / Nullable
grand_total
90
Required
profile_id
04d66e00-8617-4d43-938e-5326f1442897
Required
success_return_url
https://test.com/payment-confirmation
Required
failed_return_url
https://test.com/payment-confirmation
Required
cart_id
7567557687
Required