{"id":2613,"date":"2022-04-05T14:21:48","date_gmt":"2022-04-05T14:21:48","guid":{"rendered":"https:\/\/www.reloadly.com\/blog\/?p=2613"},"modified":"2022-04-05T08:17:03","modified_gmt":"2022-04-05T08:17:03","slug":"how-to-know-asynchronous-top-up-finished","status":"publish","type":"post","link":"https:\/\/reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/","title":{"rendered":"How to know when an asynchronous top-up finished"},"content":{"rendered":"\n<p>When using <a href=\"https:\/\/docs.reloadly.com\/airtime\" target=\"_blank\" rel=\"noreferrer noopener\">Reloadly&#8217;s AirTime API<\/a> there are two ways of making a top-up:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/docs.reloadly.com\/airtime\/top-ups\/top-up\" target=\"_blank\" rel=\"noreferrer noopener\">Synchronous<\/a><\/li><li><a href=\"https:\/\/docs.reloadly.com\/airtime\/top-ups\/async-top-up\" target=\"_blank\" rel=\"noreferrer noopener\">Asynchronous<\/a><\/li><\/ol>\n\n\n\n<p>The difference between a synchronous and an asynchronous operation lies in the fact that, when making a syncrhonous call the client won&#8217;t get a response until de server has finished processing the request, whereas in the asynchronous one the response is immediate, though the operation might not have even started yet.<\/p>\n\n\n\n<p>In the case of an asynchronous operation, the moment to spawn the actions that must take place after the top-up has taken effect is not easy to determine.<\/p>\n\n\n\n<p>The Reloadly API offers two ways for you to know when the time has come.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Via long-poll<\/h2>\n\n\n\n<p>One way to go about it is to have a process regularly asking Reloadly for the status of the operation.<\/p>\n\n\n\n<p>To do this you&#8217;ll rely on <a href=\"https:\/\/docs.reloadly.com\/airtime\/top-ups\/top-up-status\">this endpoint<\/a> (https:\/\/docs.reloadly.com\/airtime\/top-ups\/top-up-status).<\/p>\n\n\n\n<p>Here&#8217;s how it&#8217;d go:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Get the access token<\/li><li>Make the request for an async top-up<\/li><li>Make a request to get the status of the request. If the result obtained is:<ul><li><code>PROCESSING<\/code> wait a little while and try again<\/li><li><code>SUCCESSFUL<\/code> or <code>REFUNDED<\/code> execute appropriate followup actions<\/li><\/ul><\/li><\/ol>\n\n\n\n<p>This how you could do this through the CLI, assuming you&#8217;ve already got your access token:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl --location --request POST https:\/\/topups.reloadly.com\/topups-async --header 'Authorization: Bearer YOUR_TOKEN' --header 'Accept: application\/com.reloadly.topups-v1+json' --header 'Content-Type: application\/json' --data-raw '{\n\t\t\"operatorId\":\"YOUR_OPERATOR_ID\",\n\t\t\"amount\":\"10\",\n\t\t\"recipientPhone\": {\n\t\t\t\"countryCode\": \"YOUR_ISO_COUNTRY_CODE\",\n\t\t\t\"number\": \"YOUR_LOCAL_PHONE_NUMBER\"\n\t\t}\n\t}<\/pre>\n\n\n\n<p>This request would result in something like:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n  \"transactionId\": 28805\n}<\/pre>\n\n\n\n<p>Once you have the <code>transactionId<\/code> you can followup to get a status update like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl --location --request GET https:\/\/topups.reloadly.com\/topups\/28805\/status --header 'Accept: application\/com.reloadly.topups-v1+json' --header 'Authorization: Bearer YOUR_TOKEN'<\/pre>\n\n\n\n<p>Which will return something like:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n  \"code\": null,\n  \"message\": null,\n  \"status\": \"SUCCESSFUL\",\n  \"transaction\": {\n    \"transactionId\": 28805,\n    \"status\": \"SUCCESSFUL\",\n    \"operatorTransactionId\": null,\n    \"customIdentifier\": null,\n    \"recipientPhone\": \"YOUR_LOCAL_PHONE_NUMBER\",\n    \"recipientEmail\": null,\n    \"senderPhone\": null,\n    \"countryCode\": \"YOUR_COUNTRY_ISO_CODE\",\n    \"operatorId\": YOUR_OPERATOR_ID,\n    \"operatorName\": \"YOUR_OPERATOR_NAME\",\n    \"discount\": 0,\n    \"discountCurrencyCode\": \"EUR\",\n    \"requestedAmount\": 10,\n    \"requestedAmountCurrencyCode\": \"EUR\",\n    \"deliveredAmount\": 10,\n    \"deliveredAmountCurrencyCode\": \"EUR\",\n    \"transactionDate\": \"2022-03-18 09:11:24\",\n    \"pinDetail\": null,\n    \"balanceInfo\": {\n      \"oldBalance\": 741.01448,\n      \"newBalance\": 731.01448,\n      \"cost\": 10,\n      \"currencyCode\": \"EUR\",\n      \"currencyName\": \"Euro\",\n      \"updatedAt\": \"2022-03-18 13:11:24\"\n    }\n  }\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Via a webhook<\/h2>\n\n\n\n<p>Another, much better, approach is to let Reloadly make a <em>callback<\/em> upon operation end.<\/p>\n\n\n\n<p>In this case you&#8217;ll have to:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a public endpoint on your side, which can handle <code>POST<\/code> requests from Reloadly<\/li><li>Register your endpoint in your <a href=\"https:\/\/www.reloadly.com\/developers\/webhook\" target=\"_blank\" rel=\"noreferrer noopener\">Reloadly Dashboard<\/a><\/li><li>Make the originating request<\/li><\/ol>\n\n\n\n<p>This way, you&#8217;ll save a lot of resources since you won&#8217;t need to have a constantly running process issuing trivial requests to Reloadly&#8217;s servers.<\/p>\n\n\n\n<p>Instead, your application will be the one receiving one request for every relevant event.<\/p>\n\n\n\n<p>In a way, using this scheme you get the best of both worlds, sync and async.<\/p>\n\n\n\n<p>Once you have your endpoint created, registering it in Reloadly is easy. Just follow <a href=\"https:\/\/docs.reloadly.com\/webhooks\/working-with-webhooks\/configure-the-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">this instructions<\/a>.<\/p>\n\n\n\n<p>The third point, making the originating request, is exactly the same as in the previous section, so let&#8217;s have a closer look at the endpoint itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to create the public endpoint<\/h3>\n\n\n\n<p>This part can be as easy or complex as you want it to though a few basic items must be in place:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>A webserver to host your recipient application<\/li><li>Public access to such server<\/li><li>A URL within the webserver to be used as webhook target<\/li><\/ol>\n\n\n\n<p>Here&#8217;s a PHP example of what it might look like:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\nhttp_response_code(400);\n\nlogMessage(\"Got a callback from Reloadly\".PHP_EOL);\n\nif ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {\n    die('Only POST requests are acceptable');\n}\n\n$postBody = file_get_contents('php:\/\/input');\n\nlogMessage(\"Post body = '$postBody'\".PHP_EOL);\n\ntry {\n    $event = json_decode($postBody, true, 512, JSON_THROW_ON_ERROR);\n    $eventType = $event['type'];\n    logMessage(\"Event type = '$eventType'\".PHP_EOL);\n\n    switch ($eventType) {\n        case 'airtime_transaction.status':\n            http_response_code(200);\n\n            $status = $event['data']['transaction']['status'];\n            logMessage(\"Status = '$status'\".PHP_EOL);\n            doImportantStuff();\n\n            break;\n        default:\n            logMessage('Unsupported eventType '.$eventType);\n    }\n\n    echo json_encode(['received' => true]);\n} catch (\\Exception $exception) {\n    logMessage('POST body wasn\\'t json');\n}\n\nfunction logMessage(string $message): void\n{\n    error_log(date('[Y-m-d H:i:s] - '.$message));\n}\n\nfunction doImportantStuff()\n{\n    \/\/ Fill in the blanks\n}<\/pre>\n\n\n\n<p>At the point of this writing the only available event you can expect from Reloadly is <code>airtime_transaction.status<\/code> but that will most certainly change soon so keep <a href=\"https:\/\/docs.reloadly.com\/webhooks\/working-with-webhooks\/identify-events\" target=\"_blank\" rel=\"noreferrer noopener\">this resource<\/a> on your radar and, if you want to have a broader look at Reloadly&#8217;s webhooks <a href=\"https:\/\/docs.reloadly.com\/webhooks\/introduction\/what-are-webhooks\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> is where you should go next.<\/p>\n\n\n\n<p>A couple of things to keep in mind when building your endpoint:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The requests you&#8217;ll be receiving will be <code>POST<\/code><\/li><li>The details of the event will be sent as json through the post body<\/li><li>The structure of the post body is similar to:<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n  \"id\": 1,\n  \"type\": \"airtime_transaction.status\",\n  \"liveMode\": false,\n  \"date\": \"2022-02-28 08:07:00\",\n  \"data\": {\n    \"code\": null,\n    \"message\": null,\n    \"status\": \"SUCCESSFUL\",\n    \"transaction\": {\n      \"transactionId\": 1,\n      \"status\": \"SUCCESSFUL\",\n      \"operatorTransactionId\": null,\n      \"customIdentifier\": null,\n      \"recipientPhone\": \"50936377111\",\n      \"recipientEmail\": null,\n      \"senderPhone\": \"13056154908\",\n      \"countryCode\": \"HT\",\n      \"operatorId\": 173,\n      \"operatorName\": \"Digicel Haiti\",\n      \"discount\": 1.2,\n      \"discountCurrencyCode\": \"USD\",\n      \"requestedAmount\": 10,\n      \"requestedAmountCurrencyCode\": \"USD\",\n      \"deliveredAmount\": 1030.07,\n      \"deliveredAmountCurrencyCode\": \"HTG\",\n      \"transactionDate\": \"2022-02-28 03:06:58\",\n      \"pinDetail\": null,\n      \"balanceInfo\": {\n        \"oldBalance\": 1000.00000,\n        \"newBalance\": 991.20000,\n        \"currencyCode\": \"USD\",\n        \"currencyName\": \"US Dollar\",\n        \"updatedAt\": \"2022-02-28 08:06:58\"\n      }\n    }\n  }\n}<\/pre>\n\n\n\n<p>   For more details read <a href=\"https:\/\/docs.reloadly.com\/webhooks\/working-with-webhooks\/technical-considerations\" target=\"_blank\" rel=\"noreferrer noopener\">this article<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When making topups using Reloadly you have two options: syncrhonous or asynchronous. Unitl recently, going async meant a penalty on your server resources, since you had to keep polling Reloadly to get a status update.<br \/>\nNot anymore. Read here for details on how to be notified once the operation has finished.<\/p>\n","protected":false},"author":22,"featured_media":2624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[274],"tags":[14,362],"ppma_author":[361],"class_list":["post-2613","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-blog","tag-top-up-api","tag-webhooks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to know when an asynchronous top-up finished - Reloadly Blog<\/title>\n<meta name=\"description\" content=\"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to know when an asynchronous top-up finished - Reloadly Blog\" \/>\n<meta property=\"og:description\" content=\"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/\" \/>\n<meta property=\"og:site_name\" content=\"Reloadly Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-05T14:21:48+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/54.167.47.128\/wp-content\/uploads\/2022\/03\/blog-image47-01.png\" \/>\n\t<meta property=\"og:image:width\" content=\"641\" \/>\n\t<meta property=\"og:image:height\" content=\"334\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mauro Chojrin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mauro Chojrin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/\"},\"author\":{\"name\":\"Mauro Chojrin\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#\\\/schema\\\/person\\\/2dd23f6de63ee3ef6002e1303f690b0d\"},\"headline\":\"How to know when an asynchronous top-up finished\",\"datePublished\":\"2022-04-05T14:21:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/\"},\"wordCount\":553,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/blog-image47-01.png\",\"keywords\":[\"top up api\",\"Webhooks\"],\"articleSection\":[\"Developer Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/\",\"url\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/\",\"name\":\"How to know when an asynchronous top-up finished - Reloadly Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/blog-image47-01.png\",\"datePublished\":\"2022-04-05T14:21:48+00:00\",\"description\":\"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/blog-image47-01.png\",\"contentUrl\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/blog-image47-01.png\",\"width\":641,\"height\":334},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/how-to-know-asynchronous-top-up-finished\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to know when an asynchronous top-up finished\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/\",\"name\":\"Reloadly Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#organization\",\"name\":\"Reloadly\",\"url\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/logo-1.svg\",\"contentUrl\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/logo-1.svg\",\"width\":100,\"height\":100,\"caption\":\"Reloadly\"},\"image\":{\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.reloadly.com\\\/blog\\\/#\\\/schema\\\/person\\\/2dd23f6de63ee3ef6002e1303f690b0d\",\"name\":\"Mauro Chojrin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g20f6f8ad33a47f3e29be1daa6bc5835a\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g\",\"caption\":\"Mauro Chojrin\"},\"url\":\"https:\\\/\\\/reloadly.com\\\/blog\\\/author\\\/mauro-chojrin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to know when an asynchronous top-up finished - Reloadly Blog","description":"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/","og_locale":"en_US","og_type":"article","og_title":"How to know when an asynchronous top-up finished - Reloadly Blog","og_description":"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.","og_url":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/","og_site_name":"Reloadly Blog","article_published_time":"2022-04-05T14:21:48+00:00","og_image":[{"width":641,"height":334,"url":"http:\/\/54.167.47.128\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","type":"image\/png"}],"author":"Mauro Chojrin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mauro Chojrin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#article","isPartOf":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/"},"author":{"name":"Mauro Chojrin","@id":"https:\/\/www.reloadly.com\/blog\/#\/schema\/person\/2dd23f6de63ee3ef6002e1303f690b0d"},"headline":"How to know when an asynchronous top-up finished","datePublished":"2022-04-05T14:21:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/"},"wordCount":553,"commentCount":0,"publisher":{"@id":"https:\/\/www.reloadly.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#primaryimage"},"thumbnailUrl":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","keywords":["top up api","Webhooks"],"articleSection":["Developer Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/","url":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/","name":"How to know when an asynchronous top-up finished - Reloadly Blog","isPartOf":{"@id":"https:\/\/www.reloadly.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#primaryimage"},"image":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#primaryimage"},"thumbnailUrl":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","datePublished":"2022-04-05T14:21:48+00:00","description":"Making async topups using Reloadly? Do you need to do something succesful operations? Read here for details on how to be notified about it.","breadcrumb":{"@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#primaryimage","url":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","contentUrl":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","width":641,"height":334},{"@type":"BreadcrumbList","@id":"https:\/\/www.reloadly.com\/blog\/how-to-know-asynchronous-top-up-finished\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.reloadly.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to know when an asynchronous top-up finished"}]},{"@type":"WebSite","@id":"https:\/\/www.reloadly.com\/blog\/#website","url":"https:\/\/www.reloadly.com\/blog\/","name":"Reloadly Blog","description":"","publisher":{"@id":"https:\/\/www.reloadly.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.reloadly.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.reloadly.com\/blog\/#organization","name":"Reloadly","url":"https:\/\/www.reloadly.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.reloadly.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2020\/11\/logo-1.svg","contentUrl":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2020\/11\/logo-1.svg","width":100,"height":100,"caption":"Reloadly"},"image":{"@id":"https:\/\/www.reloadly.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.reloadly.com\/blog\/#\/schema\/person\/2dd23f6de63ee3ef6002e1303f690b0d","name":"Mauro Chojrin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g20f6f8ad33a47f3e29be1daa6bc5835a","url":"https:\/\/secure.gravatar.com\/avatar\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g","caption":"Mauro Chojrin"},"url":"https:\/\/reloadly.com\/blog\/author\/mauro-chojrin\/"}]}},"jetpack_featured_media_url":"https:\/\/www.reloadly.com\/blog\/wp-content\/uploads\/2022\/03\/blog-image47-01.png","authors":[{"term_id":361,"user_id":22,"is_guest":0,"slug":"mauro-chojrin","display_name":"Mauro Chojrin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/7ebf4f71751034b32e4747bbc3b7e42723e1320b8c45cda722eb794bb356890d?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/comments?post=2613"}],"version-history":[{"count":6,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2613\/revisions"}],"predecessor-version":[{"id":2625,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2613\/revisions\/2625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/media\/2624"}],"wp:attachment":[{"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/media?parent=2613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/categories?post=2613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/tags?post=2613"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/reloadly.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}